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
I'm submitting a feature request
I am currently using server side and client side bundling with webpack and babel-loader. I believe this pattern is going to increase since it improves performance (especially with lambda's), and can even simplify the toolchain developers use (shared config between server and browser).
One small change I think could help simplify basic configs though would be to make it so that the webpack target was passed into the babel caller option.
Currently if I wan't to use a .babelrc or babel.config.js I have to pass this information myself so that I can efficiently use @babel/preset-env with { node: "current" } for the server and just the defaults in the browser.
To facilitate this my webpack config becomes something like:
I'm submitting a feature request
I am currently using server side and client side bundling with webpack and babel-loader. I believe this pattern is going to increase since it improves performance (especially with lambda's), and can even simplify the toolchain developers use (shared config between server and browser).
One small change I think could help simplify basic configs though would be to make it so that the webpack
target
was passed into the babelcaller
option.Currently if I wan't to use a
.babelrc
orbabel.config.js
I have to pass this information myself so that I can efficiently use@babel/preset-env
with{ node: "current" }
for the server and just the defaults in the browser.To facilitate this my webpack config becomes something like:
This is a lot of config that I can't share just so that I can compile my files with babel differently depending on environment.
My
babel.config.js
would look something like:If the
target
was made available to babel viacaller
I could instead add just the following to my shared config which simplifies it a lot!Webpack Version:
4.30.0
Babel Core Version:
7.4.4
Babel Loader Version:
8.0.5
Please tell us about your environment:
OSX 10.x
Current behavior:
The current webpack output
target
is not made available to babel plugins.Expected/desired behavior:
Provide the current webpack output
target
viacaller
to babel plugins.Happy to create a PR for this, and perhaps even standardize this across the different babel bundler plugins.
The text was updated successfully, but these errors were encountered: