Closed
Description
Need the ability to pass the desired environment name to babel via babel-loader
.
I have such .babelrc
:
{
"presets": [
"es2015",
"stage-0",
"react"
],
"env": {
"webpack2": {
"presets": [
["es2015", {"modules": false}],
"stage-0",
"react"
],
}
}
}
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.
Metadata
Metadata
Assignees
Labels
No labels