FormidableLabs / freactal

Clean and robust state management for React and React-like libs.
MIT License
1.65k stars 47 forks source link

Enhancement: Add sideEffects: false to package.json #96

Closed ryan-roemer closed 6 years ago

ryan-roemer commented 6 years ago

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.

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:

This PR should resolve the issues discussed in:

Changes

This PR has been automatically opened by your friendly multibot. The transform code and documentation is available at: https://github.com/FormidableLabs/multibot-examples/tree/master/transforms/webpack-side-effects


The maintainers of this repo require that all pull request submitters adhere to the following:

The maintainers of this repository require you to select the semantic version type that the changes in this pull request represent. Please select one of the following:

maintainerd[bot] commented 6 years ago

maintainerd logging is enabled for this repository.

All actions related to rules and their enforcement will be logged here as a permanent record.


Click to view log...

- `2018-02-05T18:09:18.573Z:ea17ddf`: The pull request was created - `2018-02-05T18:14:15.823Z:ea17ddf`: @ryan-roemer checked `I have read and will comply with the [contribution guidelines](https://github.com/FormidableLabs/freactal/blob/master/CONTRIBUTE.md).`. - `2018-02-05T18:14:16.894Z:ea17ddf`: @ryan-roemer checked `I have read and will comply with the [code of conduct](https://github.com/FormidableLabs/freactal/blob/master/CONTRIBUTE.md).`. - `2018-02-05T18:14:18.772Z:ea17ddf`: @ryan-roemer checked `My commit messages are cleaned up and ready to merge. _(required)_`. - `2018-02-05T18:14:19.958Z:ea17ddf`: @ryan-roemer checked `All related documentation has been updated to reflect the changes made. _(required)_`. - `2018-02-05T18:14:22.843Z:ea17ddf`: @ryan-roemer selected `patch` as the semantic version.

ryan-roemer commented 6 years ago

@divmain -- This PR was scripted, so I didn't actually do real commits from a repo. I think we can just overlook the maintainerd failures (?)

ryan-roemer commented 6 years ago

Also, if we can land https://github.com/FormidableLabs/freactal/pull/94 then combined with this one, webpack4 builds for this library's users should be much smaller!

divmain commented 6 years ago

@ryan-roemer this and changes in #94 have been published in v2.0.3. Auto-publishing with maintainerd is working again, as well.

ryan-roemer commented 6 years ago

Lookin' good @divmain ! Thanks!