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
Add targets
and browserslist*
options to @babel/core
#12189
Add targets
and browserslist*
options to @babel/core
#12189
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/34601/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b024ab6:
|
31431e0
to
a8766d3
Compare
@@ -699,6 +699,7 @@ function normalizeOptions(opts: ValidatedOptions): ValidatedOptions { | |||
options.sourceMaps = options.sourceMap; | |||
delete options.sourceMap; | |||
} | |||
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
mobileToDesktop: true, | ||
env: options.browserslistEnv, | ||
env: options.env ?? options.browserslistEnv, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
01491a0
to
c621d3b
Compare
c621d3b
to
a196b73
Compare
3161cff
to
46dae56
Compare
46dae56
to
58a1e84
Compare
58a1e84
to
1f501e0
Compare
085be04
to
7bb7925
Compare
f2fc1a3
to
961dff6
Compare
60dd732
to
b024ab6
Compare
Merged into #12470 |
The commits can be reviewed one by one.
{ esmodules: "intersect" }
tohelper-compilation-targets
: it can be used to intersectesmodules
with thebrowsers
option, rather than overwriting it (fixes The esmodules target should be more future friendly #8809). Note that it cannot be used with@babel/preset-env
, and is used by settingesmodules: true
in@babel/core
. In Babel 8, we'll remove{ esmodules: "intersect" }
fromhelper-compilation-target
and make it the default behavior fortrue
.targets
,browserslistConfigFile
andbrowserslistEnv
option that can be specified in programmatic options and in config files.targets
in@babel/preset-env
.api.targets
in@babel/helper-plugin-utils
, so that we can use it in plugins/presets without worrying about it not being defined.