Bug Report
Current behavior
I have a browserslist property in my package.json, if this is set to ie 11 then my output file will contain ~43 consts, if I do not ie 11 then there's ~293 consts.
I'm using webpack & babel-loader and my presets look like:
presets: [
[
"@babel/env",
{
modules: false,
useBuiltIns: "usage",
corejs: { version: 3, proposals: true },
},
],
"@babel/preset-react",
],
(I've tried swapping the order and it didn't change much)
As far as I can tell there's nothing special about the consts that're being forgotten about, aside from them coming from a node_module (which is correctly being parsed since it's being run through @babel/preset-react just fine)
@babel/preset-env v7.12.7 gets every const with exactly the same config, both the current version (v7.13.9) and v7.13.0 seem to leave some consts.
The strange thing is if I tell @babel/env to target IE 11 explicitly by doing
{
modules: false,
useBuiltIns: "usage",
corejs: { version: 3, proposals: true },
target: {
ie: 11
},
},
then v7.13.7 works as well as v7.12.7 does when reading from the browserslist
Expected behavior
It builds an output without any consts when targetting IE 11 via browserslist
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
- Filename:
babel.config.js
{
"your": { "config": "here" }
}
Environment
System:
OS: Linux 5.4 Debian GNU/Linux 8 (jessie) 8 (jessie)
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
npmPackages:
@babel/preset-env: 7.13.7 => 7.13.7
- Babel version(s): latest as of issue
- Monorepo: no
- How you are using Babel: webpack
Repo isn't publicly accessible & I'm not sure how easy it'd be to get a contained reproducible example of it happening (might be something to do with volume, I've really got no idea)
Bug Report
Current behavior
I have a
browserslistproperty in my package.json, if this is set toie 11then my output file will contain ~43consts, if I donot ie 11then there's ~293consts.I'm using webpack & babel-loader and my presets look like:
(I've tried swapping the order and it didn't change much)
As far as I can tell there's nothing special about the
consts that're being forgotten about, aside from them coming from a node_module (which is correctly being parsed since it's being run through@babel/preset-reactjust fine)@babel/preset-env v7.12.7 gets every
constwith exactly the same config, both the current version (v7.13.9) and v7.13.0 seem to leave someconsts.The strange thing is if I tell
@babel/envto target IE 11 explicitly by doingthen v7.13.7 works as well as v7.12.7 does when reading from the browserslist
Expected behavior
It builds an output without any
consts when targetting IE 11 via browserslistBabel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.jsEnvironment
Repo isn't publicly accessible & I'm not sure how easy it'd be to get a contained reproducible example of it happening (might be something to do with volume, I've really got no idea)