-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack tree shaking does not completely remove unused re-exports #549
Comments
The new updates in |
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/package.json ## Issues This was originally uncovered / discussed at length in: * webpack/webpack#1750 This PR should resolve the issues discussed in: * #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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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 * #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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. (#965) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. (#121) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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 * #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
…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/lodash-es@4.17.5/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
…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. (#14) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. (#24) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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/lodash-es@4.17.5/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
…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. (#51) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
@ryan-roemer I'm going to close this, but ping me if you think it should remain open. |
We should verify first that present victory works with tree-shaking for webpack4. I believe there still may be issues. Let's pull a branch in https://github.com/FormidableLabs/victory-line-experiments and update webpack + victory deps and see. |
@boygirl -- I updated everything in https://github.com/FormidableLabs/victory-line-experiments to completely modern and we're all good: in dev (with optimizations on) or prod (straight up) one-off is the same as tree shaken:
🎉 |
fix warning related to categories as an object for victory axis
…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. (FormidableLabs#965) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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/lodash-es@4.17.5/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
…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/lodash-es@4.17.5/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
…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. (#965) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. (#24) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
…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. Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/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
Status: Retry experiment after ES modules build lands in all victory repos.
Webpack2 tree shaking does not completely remove unused exports, meaning that there is a difference between a one-off import vs. a full re-export use like:
and
The Problem
There is a significant different in size:
272 KB
423 KB
Diffing a demo build (which is human readable) and some random information:
victory-core/src/victory-primitives/index.js
Just picking one example on a quick skim, the
use-index
version exports of the above file the following additional components not exported byone-off-import
:Candle
Voronoi
ErrorBar
Point
Bar
Area
diff:
Looking just to
Candle
(victory-core/src/victory-primitives/candle.js
, index: 200 inone-off
), there is a problem with tree-shaking. Namely, that even in the one-off version, this code is detected as unused, but we still get therequire
for it:and the underlying source is present at index
200
.The
use-index
build has an even greater cascading effect of this problem.Upon further research, all of this runs up against what appears to be a long-standing bugs for webpack:
Tree shaking completely broken?
tree-shaking with lodash-es
Best synopsis of observed issue so far: webpack/webpack#1750 (comment)
/cc @boygirl @chrisbolin
The text was updated successfully, but these errors were encountered: