Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit e9797f4

Browse files
authored
webpack@4 / webpack@next will support package.json:sideEffects: false wherein libraries can indicate their ESM re-exports are side effect free and can be much more efficiently removed for smaller, faster final bundles. (#59)
Lodash has already rolled out this change in https://unpkg.com/[email protected]/package.json ## Issues This was originally uncovered / discussed at length in: * webpack/webpack#1750 This PR should resolve the issues discussed in: * FormidableLabs/victory#549 * FormidableLabs/redux-little-router#262 ## Changes * Add `sideEffects: false` to `package.json` to allow webpack4 tree-shaking to actually remove all unused code. > This PR has been automatically opened by your friendly [`multibot`](https://github.com/FormidableLabs/multibot/). The transform code and documentation is available at: https://github.com/FormidableLabs/multibot-examples/tree/master/transforms/webpack-side-effects
1 parent e44163a commit e9797f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@
6060
"style-loader": "^0.19.0",
6161
"webpack": "^3.6.0",
6262
"webpack-dev-server": "^2.9.1"
63-
}
63+
},
64+
"sideEffects": false
6465
}

0 commit comments

Comments
 (0)