Skip to content

Commit c032f73

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. (#465)
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 f5017fa commit c032f73

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
@@ -109,5 +109,6 @@
109109
"raf/polyfill",
110110
"<rootDir>/jest-setup.js"
111111
]
112-
}
112+
},
113+
"sideEffects": false
113114
}

0 commit comments

Comments
 (0)