-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update Babel config for modern output #1754
Conversation
- Switched babelrc to use recommended settings for "modern JS", with `targets: esmodules` and `bugfixes: true` - Fixed missing .tsx extensions in build scripts - Silenced Rollup warning about missing flag
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9b2029a:
|
Size Change: -109 B (0%) Total Size: 20.2 kB
|
✔️ Deploy Preview for react-redux-docs ready! 🔨 Explore the source changes: 9b2029a 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-redux-docs/deploys/60e3a454bbc1ab0008457121 😎 Browse the preview: https://deploy-preview-1754--react-redux-docs.netlify.app |
✔️ Deploy Preview for react-redux-docs ready! 🔨 Explore the source changes: 9b2029a 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-redux-docs/deploys/60e3a6cb1280190008cb2c1f 😎 Browse the preview: https://deploy-preview-1754--react-redux-docs.netlify.app |
f0ae5d6
to
9b2029a
Compare
Hi,I'm confused with the code in ...
targets: {
esmodules: true,
},
... The code will keep I wonder What is the purpose of this. Hope I didn't offend you. |
What is the problem with |
Thanks for your answer, I get it. Because of the users of our products, I have to support iOS9. When I use react-redux, I config the webpack like this as usual: {
test: /\.(ts|js)x?$/,
exclude: /node_modules/
} This doesn't work on iOS9. Then I find that redux's Thanks for your awesome work. |
We will also drop IE support over in redux soon, since even Microsoft finally dropped IE support. We cannot justify shipping a significantly higher bundle size to hundreds of millions of users that do not need it to support a sub-1-percent user base. If you know your audience, you can make that choice and transpile yourself, but we cannot make it for all our users - that transpiled code is slower, eats more data and CPU and as a consequence even hurts the environment for no good use through higher energy usage. I'd argue iOS9, which is from 2011 and has not seen any update since 2019 is very far out of the scope of something that we can support by default if that means a worse experience for all other users. "commonJS" means exactly that - "it is a commonJS module". It does not say anything about supported browser features. Now that the last non-evergreen browser has died you can expect that most libraries out there will move to a target that is more around ES2019 or even higher. |
Yeah, short answer is we just haven't shipped a major version of Redux or Redux Toolkit in forever. Next time we do, we'll drop IE11 support for both. |
Thanks for your detailed answers! I will transpile myself. ^-^ |
targets: esmodules
andbugfixes: true