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

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

View File

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