-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Do not compile with babel by default #4838
Conversation
This pull request has been linked to and will mark 1 task as "Done" when merged:
|
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
Cached Bundles
React HackerNews ✅
Timings
Cold Bundles
Cached Bundles
AtlasKit Editor ✅
Timings
Cold Bundles
Cached Bundles
Three.js x4 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... |
If this gets merged we do need to update the docs: https://v2.parceljs.org/getting-started/webapp/#browserslist |
Will this some cause some problems with IE11 for @wbinnssmith ? And maybe we should off on this until Babel can be configured to force transpilation of (some) node_modules ( |
Can this and similar statements be expanded to include the non-package.json equivalents like the .browserslistrc file, if that's not already implicitly the case to people in this project? Those alternatives are an established concept already for configuration, so they should consistently remain first class citizens. I don't like polluting package.json with all kinds of arbitrary config if I have a choice. |
This should definitely be the case, I'm not sure if this change actually respects that though |
It should. It's the TargetResolver's responsibility to read browserslist configs, and the babel transformer just uses the pre-resolved targets so I don't think any changes should be needed for that. |
root: options.projectRoot, | ||
babelrcRoots, |
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.
Why did you remove these options?
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 believe setting the cwd to the projectRoot makes babel able to find the root config itself rather than needing us to pass them in.
…ults # Conflicts: # packages/core/core/test/TargetRequest.test.js # packages/core/integration-tests/test/babel.js # packages/transformers/babel/src/config.js
This disables babel compilation by default, for both development and production builds, unless one or more of the following are true:
browserslist
in your package.json.If none of these are true, code will be passed through un-transpiled. In addition:
flow-bin
in the dependencies of the package.json in the root of your project.The reasoning behind this is as follows:
Closes T-525