g6/.babelrc.js
2019-11-20 22:07:29 +08:00

40 lines
619 B
JavaScript

module.exports = (api) => {
api.cache(() => process.env.NODE_ENV);
const isTest = api.env('site')
if (isTest) {
return {
"plugins": [
"transform-remove-strict-mode"
],
"presets": [
[
"@babel/preset-env",
{
"loose": true,
"modules": false
}
],
"babel-preset-gatsby"
]
}
}
return {
"plugins": [
"transform-remove-strict-mode"
],
"presets": [
[
"@babel/preset-env",
{
"loose": true,
"modules": false
}
]
]
}
}