Closed Andarist closed 6 years ago
Thank you so much for this @Andarist. I've always wondered what are the correct fields in package.json and how to effectively use them. I'm glad that you showed me. 💪
Anyway, I didn't know about loose
mode. It looks that we might want to use it (the more performant code is the main pros or it, right?). I'm going to create an issue for it and we can eventually drop babel-preset-react-app
in favor of an another preset - do you have some in your mind?
Anyway, I didn't know about loose mode. It looks that we might want to use it (the more performant code is the main pros or it, right?). I'm going to create an issue for it and we can eventually drop babel-preset-react-app in favor of an another preset - do you have some in your mind?
It's not 100% spec-compliant, but I literally havent bumped into any issue with it yet - but you must know that its behavior might differ from what is expected in edge cases. It produces less code which is more performant.
I usually just use preset-env with object-rest-spread and class-properties.
Thanks for your input I hope that I will find time to dig in more into it. :shipit:
IMHO you should also use
loose
mode for babel transforms, but babel-preset-react-app doesnt have support for it - so I didnt change it in this PR.