Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the babel transformer plugin for Parcel 2.
Changes to core
getConfig
andgetPackage
Asset methods now mutate the asset by adding connected files directly rather than returning them alongside the config. Now they just return the config itself and update the asset to include those file references. This is much easier to use in practice, and the connected files are already propagated along the pipeline.getConfig
can be passed options includingpackageKey
, which is used to get a key from package.json (e.g.babel
), andparse
which can be set to false to disable automatic parsing of the config file (used for.browserslist
files).Differences from Parcel 1
.babelrc
config forbabel-preset-env
is no longer merged with our internally generated one. Instead, it overrides the internally generated config. This lets the user have more control when they need it.engines.node
field in package.json when compiling for a browser target. This was causing issues for people: Error while rendering map with mapbox-gl: "_typeof is not defined" #1128useBuiltIns: 'usage'
mode in babel-preset-env by default. This means that babel-polyfill will be included automatically based on usage of features in code..babelrc
files innode_modules
to find browser/node target information.