Merge pull request #750 from antvis/fix_site_2

Fix site 2
This commit is contained in:
@thinkinggis 2021-08-23 19:51:39 +08:00 committed by GitHub
commit dade29c13a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -6,13 +6,20 @@ module.exports = api => {
const isCommonJS = api.env('cjs');
const isESModule = api.env('esm');
const isTest = api.env('test');
if (isSite) {
return {
presets: [
'babel-preset-gatsby', {
silence: true
}
'@babel/preset-env',
[
'@babel/preset-react',
{
development: isCommonJS
}
],
// 'babel-preset-gatsby', {
// silence: true
// },
],
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",