Skip to content

Commit

Permalink
Merge pull request #118 from BipanKishore/source-map-issue-fix-for-lib
Browse files Browse the repository at this point in the history
Source map issue fix for lib
  • Loading branch information
BipanKishore authored May 19, 2024
2 parents 52aae2f + 3a7b840 commit eb57d0b
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 30 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-n-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ jobs:
run: |
npm run core:prod
- name: Resizable React/JS/Next/Demo App Builds
- name: Resizable React/JS/Next libs Builds
run: |
npm run prod
- name: Resizable Demo App Build
run: |
npm run demo:prod
- name: Resizable React Testing
run: |
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
"scripts": {
"lint": "lerna run lint",
"demo": "lerna run demo",
"demo:prod": "lerna run demo:prod" ,
"core": "lerna run core",
"core:prod": "lerna run core:prod",
"start": "lerna run start",
"prod": "lerna run prod",
"patch": "lerna run patch"
"patch": "lerna run patch",
"version": "lerna version"
},
"devDependencies": {
"@babel/eslint-parser": "^7.22.11",
Expand Down
3 changes: 1 addition & 2 deletions packages/demo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
},
"scripts": {
"demo": "react-scripts start",
"build": "react-scripts build",
"prod": "react-scripts build",
"demo:prod": "react-scripts build",
"eject": "react-scripts eject",
"prelink-local": "rimraf node_modules/.cache",
"link-local": "npm link resizable-panes-react react",
Expand Down
42 changes: 21 additions & 21 deletions packages/resizable-core/build.script.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ export const cjsOutOptionsDevelopment = {

export const cjsOutOptionsProduction = {
file: `${CJS_BUILD_PATH}${'index.cjs.js'}`,
format: 'cjs'
format: 'cjs',
sourcemap: true,
sourcemapPathTransform: (sourcePath) => {
return sourcePath.substring('../'.length)
}
}

export const esmOutOptionsDevelopment = {
Expand All @@ -61,19 +65,22 @@ export const esmOutOptionsDevelopment = {

export const esmOutOptionsProduction = {
file: `${ESM_BUILD_PATH}${'index.esm.js'}`,
format: 'esm'
}

export const iffeOutOptionsProduction = {
file: `${IFFE_BUILD_PATH}${'index.iffe.js'}`,
name: 'resizablePanes',
format: 'iife'
format: 'esm',
sourcemap: true,
sourcemapPathTransform: (sourcePath) => {
return sourcePath.substring('../'.length)
}
}

export const umdOutOptionsProduction = {
file: `${UMD_BUILD_PATH}${'index.umd.js'}`,
name: 'resizablePanes',
format: 'umd'
format: 'umd',
globals,
sourcemap: true,
sourcemapPathTransform: (sourcePath) => {
return sourcePath.substring('../'.length)
}
}

export const developmentPlugins = [
Expand Down Expand Up @@ -116,24 +123,17 @@ export const typesRollupConfig = {
export const developmentConfig = {
input: 'src/index.ts',
output: [
{
...cjsOutOptionsDevelopment
},
{
...esmOutOptionsDevelopment
}
cjsOutOptionsDevelopment,
esmOutOptionsDevelopment
],
plugins: developmentPlugins,
external: EXTERNALS
}

const productionOutput = [cjsOutOptionsProduction,
const productionOutput = [
cjsOutOptionsProduction,
esmOutOptionsProduction,
iffeOutOptionsProduction,
umdOutOptionsProduction].map((outputConfig) => ({
...outputConfig,
globals
}))
umdOutOptionsProduction]

export const productionConfigMinSet = {
input: 'src/index.ts',
Expand Down
4 changes: 2 additions & 2 deletions packages/resizable-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resizable-core",
"version": "6.0.9",
"version": "6.0.10",
"description": "A straightforward library that enables dynamic resizing of layouts and saves the layout configurations.",
"module": "./lib/esm/index.esm.js",
"main": "./lib/cjs/index.cjs.js",
Expand Down Expand Up @@ -115,7 +115,7 @@
"url": "https://github.com/BipanKishore/resizable-panes-react.git"
},
"bugs": {
"url": "https://github.com/BipanKishore/resizable-panes-react/issues",
"url": "https://github.com/BipanKishore/resizable-panes/issues",
"email": "bipankishore@gmail.com"
},
"homepage": "https://bipankishore.github.io/resizable-panes-demo/"
Expand Down
2 changes: 1 addition & 1 deletion packages/resizable-panes-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resizable-panes-js",
"version": "6.0.21",
"version": "6.0.22",
"description": "A straightforward library that enables dynamic resizing of layouts and saves the layout configurations.",
"module": "./lib/esm/index.esm.js",
"main": "./lib/cjs/index.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/resizable-panes-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resizable-panes-next",
"version": "6.0.23",
"version": "6.0.24",
"description": "A straightforward library that enables dynamic resizing of layouts and saves the layout configurations.",
"module": "./lib/esm/index.esm.js",
"main": "./lib/cjs/index.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/resizable-panes-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resizable-panes-react",
"version": "6.0.21",
"version": "6.0.22",
"description": "A straightforward library that enables dynamic resizing of layouts and saves the layout configurations.",
"module": "./lib/esm/index.esm.js",
"main": "./lib/cjs/index.cjs.js",
Expand Down

0 comments on commit eb57d0b

Please sign in to comment.