perf(cli): disable enableObjectSlots by default

This commit is contained in:
chenjiahan
2021-01-09 21:43:29 +08:00
parent e3e9012ead
commit 530ee0e0d0
3 changed files with 15 additions and 9 deletions

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',
],
};