Closed kylemh closed 4 years ago
I couldn't figure out or prevent my project from bundling with spread operator 😢
Ended up just slapping the Babel-CLI onto the end of the build process 🙃
Would love some help fixing this.
https://github.com/boopathi/react-svg-loader/issues/289
Ah this is the problem
@kylemh so does a .browserslistrc
file work? In-line config for preset-env
inside of babelrc
should work, but we don't have tests for an external .browserslistrc
file and I was concerned some of the path resolution might affect it.
@kylemh following up on my previous question
Ill jump into this ticket and the Storybook one tomorrow! I’ve got them both saved.
Make it one more day... Sorry about the delay.
thanks a ton @agilgur5 really helping me ❤️
hoping to get back to TSDX stuff soon
@kylemh I manually tested a .browserslistrc
while writing up #795 and can confirm it worked. Will even error out if you've got an unknown Browserslist query, typo, etc.
Probably still good to add an integration test for .browserslistrc
to make sure it continues to work
Right, sorry for continuing to comment, but I actually closed this when I realized that this was the problem.
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.
Current Behavior
I have a custom babel config:
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