perf(cli): disable enableObjectSlots by default

This commit is contained in:
chenjiahan
2021-01-09 21:44:12 +08:00
parent e3e9012ead
commit 530ee0e0d0
3 changed files with 15 additions and 9 deletions
+1 -1
View File
@@ -53,7 +53,7 @@
"@vant/markdown-vetur": "^2.0.2",
"@vant/stylelint-config": "^1.4.2",
"@vant/touch-emulator": "^1.2.0",
"@vue/babel-plugin-jsx": "^1.0.0",
"@vue/babel-plugin-jsx": "^1.0.1",
"@vue/test-utils": "2.0.0-beta.10",
"address": "^1.1.2",
"autoprefixer": "^9.0.0",
+7 -1
View File
@@ -2,6 +2,7 @@ import { ConfigAPI } from '@babel/core';
type PresetOption = {
loose?: boolean;
enableObjectSlots?: boolean;
};
module.exports = function (api?: ConfigAPI, options: PresetOption = {}) {
@@ -42,7 +43,12 @@ module.exports = function (api?: ConfigAPI, options: PresetOption = {}) {
},
'vant',
],
'@vue/babel-plugin-jsx',
[
'@vue/babel-plugin-jsx',
{
enableObjectSlots: options.enableObjectSlots,
},
],
'@babel/plugin-transform-object-assign',
],
};