Continued from:
#398 (comment)
My proposal is that we allow the following in .babelrc:
{
"presets": ["es2015"], // base config
"sourceMaps": "inline",
"env": {
"ava" : { // if `env/ava` is present, we disable our custom config.
"presets": ["stage-0"],
"plugins": [] //maybe we automatically append power-assert for them?
},
"production" : {
"sourceMaps": false
}
}
}
There are a couple questions that need to be answered in order to proceed. Specifically, can we change which env Babel uses on a per file basis? It might be as easy as setting process.env.BABEL_ENV before each call to babel.transform(..)
Continued from:
#398 (comment)
My proposal is that we allow the following in
.babelrc:There are a couple questions that need to be answered in order to proceed. Specifically, can we change which
envBabel uses on a per file basis? It might be as easy as settingprocess.env.BABEL_ENVbefore each call tobabel.transform(..)