-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Support jsnext:main and module fields #862
Labels
Comments
Agreed, this should be pretty easy to setup. |
Can reference this PR for a roadmap, reduxjs/redux#1369. |
@davezuko is something you'd want to pick up? |
I could, but don't want to assign it to myself until I have time to commit to it, especially with the holidays coming up. Will keep it in mind and if I manage to take a crack at it I'll let you know/post a PR and link here. |
Released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is fairly low on the priority list, especially since
v1.0.0
is still looking to be shipped, but I wanted to document it for record keeping.It would be great for SUIR to provide a bundle that maintains ES6 imports/exports so that bundlers that natively understand ES6 modules (webpack 2, rollup) can tree shake its usage in order to produce smaller bundles. Adding support for
babel-plugin-lodash
is already a great start, especially for webpack 1.0 and similar; this change would take it a step further by allowing bundlers to perform the same thing natively without the overhead of additional tooling.Note: it's important that the code still be preprocessed with babel, because we should not assume anything else about the user's environment.
I believe that this is important piece of functionality, especially as the library grows, because it means that users don't have to be as concerned about the library's weight as a whole and can reap the benefits of targeted bundles without additional work on their part, especially as more bundlers implement tree shaking natively.
See:
Steps
babel-plugin-lodash
)Expected Result
Unused SUIR code should not be included in the final bundle.
Actual Result
All SUIR code is put into the bundle regardless of whether or not it was used.
Version
all
The text was updated successfully, but these errors were encountered: