build(deps): bump @babel/types from 7.11.5 to 7.12.0

This commit is contained in:
Evan You
2020-10-15 12:02:20 -04:00
parent 3aabd59de1
commit dbc29c32e3
5 changed files with 21 additions and 8 deletions

View File

@@ -32,8 +32,8 @@
"homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-core#readme",
"dependencies": {
"@vue/shared": "3.0.0",
"@babel/parser": "^7.11.5",
"@babel/types": "^7.11.5",
"@babel/parser": "^7.12.0",
"@babel/types": "^7.12.0",
"estree-walker": "^2.0.1",
"source-map": "^0.6.1"
}

View File

@@ -35,8 +35,8 @@
"vue": "3.0.0"
},
"dependencies": {
"@babel/parser": "^7.11.5",
"@babel/types": "^7.11.5",
"@babel/parser": "^7.12.0",
"@babel/types": "^7.12.0",
"@vue/compiler-core": "3.0.0",
"@vue/compiler-dom": "3.0.0",
"@vue/compiler-ssr": "3.0.0",

View File

@@ -160,7 +160,7 @@ export function compileScript(
)
} else if (node.type === 'ExportNamedDeclaration' && node.specifiers) {
const defaultSpecifier = node.specifiers.find(
s => s.exported.name === 'default'
s => s.exported.type === 'Identifier' && s.exported.name === 'default'
) as ExportSpecifier
if (defaultSpecifier) {
defaultExport = node
@@ -334,7 +334,10 @@ export function compileScript(
specifier.exported.start! + startOffset + 7,
defaultTempVar
)
} else if (specifier.type === 'ExportSpecifier') {
} else if (
specifier.type === 'ExportSpecifier' &&
specifier.exported.type === 'Identifier'
) {
if (specifier.exported.name === 'default') {
checkDuplicateDefaultExport(node)
defaultExport = node