Skip to content

Commit

Permalink
fix(build): reduce npm package size by 30% by removing source in sour…
Browse files Browse the repository at this point in the history
…ce maps

Given that the original source is present in the package, it can still be loaded
as-needed from the filesystem, so this was pure duplication. For a pure web build
without a bundler (who is still doing that?), if source maps are still needed,
this will possibly cause an issue. In that case we can look into committing a different
build file for umd.
  • Loading branch information
STRML committed Jan 10, 2022
1 parent 388b79f commit 3ac855c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ examples/*.js
!examples/generate.js
!examples/vars.js
.vscode
*.tgz
2 changes: 1 addition & 1 deletion dist/react-grid-layout.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react-grid-layout.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
libraryTarget: "umd",
library: "ReactGridLayout"
},
devtool: "source-map",
devtool: "nosources-source-map",
externals: {
react: {
commonjs: "react",
Expand Down

0 comments on commit 3ac855c

Please sign in to comment.