.browserslistrc being ignored from @babel/preset-env
See original GitHub issueCurrent Behavior
I have a custom babel config:
{
"presets": ["@babel/preset-env", "@babel/react", "@babel/typescript"],
"plugins": ["@babel/plugin-transform-react-display-name", "@babel/plugin-proposal-object-rest-spread"]
}
and a .browserslistrc
file with Edge 16 (among others)
The build step includes destructured object spread operators 😦
Expected behavior
The spread operators are transpiled down to something more acceptable for the browsers I want to use based off of .browserslistrc
.
Suggested solution(s)
Fast track #634
Your environment
Software | Version(s) |
---|---|
TSDX | latest |
TypeScript | latest |
Browser | Edge 16 |
npm/Yarn | yarn |
Node | v10.16.2 |
Operating System | MacOS latest |
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Babel with babel-preset-env seems to ignore browserslist config
But, the problem is that Babel seems to ignore the browserslist key. The same is true if I use a .browserslistrc file containing:...
Read more >babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without ... we recommend using a .browserslistrc file to...
Read more >Serve modern code to modern browsers for faster page loads
To use Babel to only transpile what is needed for your users, you need to: Identify which browsers you want to target. Use...
Read more >Problem: Babel isn't compiling my code how I expected
+ presets: ['@babel/preset-env']. + }. + }. + ]. + }. } To be brief about these additions: module.rules says we can expect...
Read more >browserslist - npm
... like Autoprefixer, Stylelint and babel-env-preset. ... using queries like last 2 versions to be free from updating versions manually.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I realize that, but I had also asked above https://github.com/formium/tsdx/issues/655#issuecomment-608589483 if
.browserslistrc
actually does work or not which never got a response. I was able to test this myself now so have a confirmation on that.thanks a ton @agilgur5 really helping me ❤️
hoping to get back to TSDX stuff soon