chore: revert some unneccessary changes

This commit is contained in:
afc163 2019-11-14 23:13:05 +08:00
parent b9f273a469
commit 5782c02405
1 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,7 @@
// @see https://babeljs.io/docs/en/next/config-files#project-wide-configuration
module.exports = (api) => {
const env = api.cache(() => process.env.NODE_ENV);
if(env === 'site') {
api.cache(() => process.env.NODE_ENV);
if(api.env('site')) {
return {
"presets": [
"babel-preset-gatsby"
@ -38,7 +38,12 @@ module.exports = (api) => {
},
},
],
'@babel/preset-react',
[
'@babel/preset-react',
{
development: process.env.BABEL_ENV !== 'build',
},
],
'@babel/preset-typescript',
],
plugins: [