Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

[BUG] Webpack tree-shaking isn't working for root imports. #262

Closed
2 tasks
ryan-roemer opened this issue Feb 2, 2018 · 1 comment
Closed
2 tasks

[BUG] Webpack tree-shaking isn't working for root imports. #262

ryan-roemer opened this issue Feb 2, 2018 · 1 comment

Comments

@ryan-roemer
Copy link
Member

ryan-roemer commented Feb 2, 2018

Overview

Webpack tree-shaking at least as of 3.10 just isn't working is the short answer. I have a new experiment repository up at: https://github.com/FormidableLabs/rlr-tree-shaking-experiment

This mean a couple of things:

  1. Any builds importing like import { something } from 'redux-little-router' is likely getting a lot more code and maybe even other dependencies than they should.
  2. This explains the behavior in [Discussion] More guidance / docs / programmatic help for switching between immutable vs. without (?) #261 that shouldn't be happening.

Workarounds

The present workaround to all of this is one-off imports, which means something like instead of:

import { routerForBrowser } from 'redux-little-router';

do:

import routerForBrowser from 'redux-little-router/es/environment/browser-router';

in your frontend code and:

import routerForBrowser from 'redux-little-router/lib/environment/browser-router';

in your node code.

This is problematic for universal code which instead should probably do something like:

import routerForBrowser from 'redux-little-router/environment/browser-router';

in universal code and something like:

const path = require('path');

alias: {
  'redux-little-router': path.dirname(require.resolve('redux-little-router/es/index'))
}

in webpack config.

Task

/cc @tptee

ryan-roemer added a commit to FormidableLabs/formidable-charts that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/victory-pie that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/spectacle that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-live that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/component-playground that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/freactal that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/victory that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to urql-graphql/urql that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-animations that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-game-kit that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/radium that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/nuka-carousel that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/victory-chart that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/victory-core that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-shuffle that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-progressive-image that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/radium-grid that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-music that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/radium that referenced this issue Feb 5, 2018
…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
ryan-roemer added a commit to FormidableLabs/component-playground that referenced this issue Feb 5, 2018
…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
tptee pushed a commit that referenced this issue Feb 5, 2018
…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
@ryan-roemer
Copy link
Member Author

Fixed in https://github.com/FormidableLabs/redux-little-router/releases/tag/v15.0.0 with the caveat that you need webpack@4+.

ryan-roemer added a commit to FormidableLabs/spectacle that referenced this issue Mar 15, 2018
…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
ryan-roemer added a commit to FormidableLabs/formidable-charts that referenced this issue Mar 15, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-animations that referenced this issue Mar 15, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-game-kit that referenced this issue Mar 15, 2018
…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
ryan-roemer added a commit to FormidableLabs/react-music that referenced this issue Mar 15, 2018
…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
jaredbrookswhite pushed a commit to jaredbrookswhite/radium that referenced this issue Aug 22, 2018
…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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant