fix: site 启动

This commit is contained in:
象数 2021-08-23 18:15:33 +08:00
parent e0fb9d8ac8
commit 3290d4713d
2 changed files with 13 additions and 5 deletions

View File

@ -8,11 +8,19 @@ module.exports = api => {
const isTest = api.env('test'); const isTest = api.env('test');
if (isSite) { if (isSite) {
console.log('-------------->')
return { return {
presets: [ presets: [
'babel-preset-gatsby', { '@babel/preset-env',
silence: true // 'babel-preset-gatsby', {
// silence: true
// },
[
'@babel/preset-react',
{
development: isCommonJS
} }
]
], ],
plugins: [ plugins: [
'@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-optional-chaining',

View File

@ -55,7 +55,7 @@
"babel-plugin-transform-inline-environment-variables": "^0.4.3", "babel-plugin-transform-inline-environment-variables": "^0.4.3",
"babel-plugin-transform-node-env-inline": "^0.4.3", "babel-plugin-transform-node-env-inline": "^0.4.3",
"babel-plugin-transform-postcss": "^0.3.0", "babel-plugin-transform-postcss": "^0.3.0",
"babel-preset-gatsby": "^0.5.8", "babel-preset-gatsby": "^1.12.0",
"babel-template": "^6.26.0", "babel-template": "^6.26.0",
"clean-webpack-plugin": "^3.0.0", "clean-webpack-plugin": "^3.0.0",
"commitizen": "^4.0.3", "commitizen": "^4.0.3",