-
Notifications
You must be signed in to change notification settings - Fork 674
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
modernize Babel config #1721
modernize Babel config #1721
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/systemui/theme-ui/D6n2T9AAsVYD2SvYq11vsRpEXmZf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a lot of experience with this, so not really sure, but go for it!
5dd2b45
to
f32a6e8
Compare
lerna failed on canary release. Releasing so many packages is bit flaky, but this PR is a nice change to bundle size regardless. https://github.com/system-ui/theme-ui/pull/1721/checks?check_run_id=2617831975 |
6e98050
to
72bae03
Compare
[breaking] Internet Explorer 11 is no longer supported. Babel Preset Env configuration was changed to: ``` { bugfixes: true, loose: true, modules: false, targets: '> 0.25%, not dead, not ie 11', } ``` If you're targetting old browsers, you can transpile your node_modules to ensure full control and compatibility. See Babel Preset Env docs: https://babeljs.io/docs/en/babel-preset-env
72bae03
to
0d9b13b
Compare
We're dropping almost 10 KB! @lachlanjc I'm almost ready to merge when you give it another look.
To-Do for this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incredible! Let's do it
🚀 PR was released in |
First commit of this PR hase the same configuration for
@babel/preset-env
Emotion uses (if I'm not wrong — emotion/babel-preset-emotion-dev/src/index.js).Enabling
loose
resulted with 20% reduction in build size compared to currentdevelop
.Release notes
All Theme UI package became on average 34% lighter! 🪶 It's 9.5kB if you sum all of them!
The trade-off is, Babel config has changed and it no longer supports Internet Explorer 11.
If you need to support legacy browsers, you can transpile node_modules (e.g. with next-transpile-modules).
Published prerelease version:
v0.9.0-develop.1
Changelog
Release Notes
modernize Babel config (#1721)
All Theme UI package became on average 34% lighter! 🪶 It's 9.5kB if you sum all of them!
The trade-off is, Babel config has changed and it no longer supports Internet Explorer 11.
If you need to support legacy browsers, you can transpile node_modules (e.g. with next-transpile-modules).
🚀 Enhancement
@theme-ui/preset-base
,@theme-ui/preset-bootstrap
,@theme-ui/sidenav
,@theme-ui/typography
🐛 Bug Fix
@theme-ui/components
develop
@theme-ui/components
📝 Documentation
Authors: 2