You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
I'm building multiple versions with different configurations (browser, capacitor etc.) at the same time.
I would like to use different browserslist environments for different versions.
Webpack supports setting browserslist environment, but that doesn't affect babels browserslistEnv.
I tried to get target it with api.caller(), and it seems webpack doesn't pass the original target but only passes some hardcoded values such as "web" or "node".
I probably could give full babel configuration with browserslistEnv to babel-loader in webpack config but I would prefer separate babel.config.js.
Expected/desired behavior:
I would like to somehow be able to change browserslistEnv based on webpack build configuration while using separate babel.config.js and .browserslistsrc files.
The text was updated successfully, but these errors were encountered:
I managed to get different environments using envName option in webpack.config and then adding "browserslistEnv: api.env()" to babel.config.js.
However it would be nice, if webpack's browserslist environment could be the default browserslistEnv.
I did a quick look at webpack source and I don't think it is currently possible to get the original target in loaders currently. So this might also need changes to webpack.
BEFORE YOU SUBMIT please read the following:
I'm submitting a feature request
Webpack Version:
5.84.1
Babel Core Version:
7.22.1
Babel Loader Version:
9.1.2
Please tell us about your environment:
Windows 10
Current behavior:
I'm building multiple versions with different configurations (browser, capacitor etc.) at the same time.
I would like to use different browserslist environments for different versions.
Webpack supports setting browserslist environment, but that doesn't affect babels browserslistEnv.
I tried to get target it with api.caller(), and it seems webpack doesn't pass the original target but only passes some hardcoded values such as "web" or "node".
I probably could give full babel configuration with browserslistEnv to babel-loader in webpack config but I would prefer separate babel.config.js.
Expected/desired behavior:
I would like to somehow be able to change browserslistEnv based on webpack build configuration while using separate babel.config.js and .browserslistsrc files.
The text was updated successfully, but these errors were encountered: