-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
Setup BABEL_ENV for Webpack2 via loader #283
Comments
the es2015 preset setup you are using is missing the loose property set to true |
look at my comment in this issue #282 |
@BlackSonic what does |
Can you please explain what your problem is? I'm sorry but I didn't get exactly what you are saying. If you set BABEL_ENV to webpack2 it should pick up the correct babel config from you .babelrc |
@danez sorry, my fault. I'm using webpack bundler with multiple configs (server, client, admin, ...). Lookup behavior for
PS. This is a very cool feature for the transition period when we want to use |
@nodkz here is a good explanation in the release notes |
@BlackSonic many thanks! Catch the
Example of how initial ES6 code generated to |
I'm in the exact same situation, is there a workaround in the meantime ? |
+1 |
Are maintainers ok on principle to add an env query parameter to babel-loader ? |
👍 |
+1...This behaviour certainly is useful.To get something similar to what @nodkz is talking about i create a separate babelrc and reference it via the 'extends' query option.Not very clean IMHO 'cause my babel configuration is split in two files, one for the build tools and one for webpack bundling.But gets the job done.Did anyone else tackle this problem differently? |
fix #283 Signed-off-by: Maël Lavault <[email protected]>
Need the ability to pass the desired environment name to babel via
babel-loader
.I have such
.babelrc
:I'm starting webpack via run script which written with es6 modules. But if I start script with
BABEL_ENV=webpack2
then it requires rewriting all scripts to commonjs style.Furthermore I should rewrite all app, cause use Relay with babelRelayPlugin.
So the better way to use Webpack2 with passing env value via
babel-loader
settings.The text was updated successfully, but these errors were encountered: