chore: `enableObjectSlots` of `@vue/babel-plugin-jsx` should be false

pull/3959/head
Amour1688 2021-04-20 10:38:19 +08:00
parent fb5d2e5054
commit 9c3cf323fe
3 changed files with 6 additions and 3 deletions

View File

@ -8,7 +8,7 @@ module.exports = function(modules) {
isTSX: true,
},
],
[resolve('@vue/babel-plugin-jsx'), { mergeProps: false }],
[resolve('@vue/babel-plugin-jsx'), { mergeProps: false, enableObjectSlots: false }],
resolve('@babel/plugin-proposal-optional-chaining'),
resolve('@babel/plugin-transform-object-assign'),
resolve('@babel/plugin-proposal-object-rest-spread'),

View File

@ -97,7 +97,10 @@ function getWebpackConfig(modules) {
options: {
presets: [resolve('@babel/preset-env')],
plugins: [
[resolve('@vue/babel-plugin-jsx'), { mergeProps: false }],
[
resolve('@vue/babel-plugin-jsx'),
{ mergeProps: false, enableObjectSlots: false },
],
resolve('@babel/plugin-proposal-object-rest-spread'),
],
},

View File

@ -33,7 +33,7 @@ const babelConfig = {
style: true,
},
],
['@vue/babel-plugin-jsx', { mergeProps: false }],
['@vue/babel-plugin-jsx', { mergeProps: false, enableObjectSlots: false }],
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-object-assign',
'@babel/plugin-proposal-object-rest-spread',