Skip to content

Commit 3ac855c

Browse files
committed
fix(build): reduce npm package size by 30% by removing source in source 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.
1 parent 388b79f commit 3ac855c

4 files changed

+4
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ examples/*.js
1212
!examples/generate.js
1313
!examples/vars.js
1414
.vscode
15+
*.tgz

dist/react-grid-layout.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-grid-layout.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
libraryTarget: "umd",
1818
library: "ReactGridLayout"
1919
},
20-
devtool: "source-map",
20+
devtool: "nosources-source-map",
2121
externals: {
2222
react: {
2323
commonjs: "react",

0 commit comments

Comments
 (0)