fix(sfc): avoid auto name inference leading to unwanted recursion

fix #5965
fix #6027
fix #6029
This commit is contained in:
Evan You
2022-06-06 17:36:47 +08:00
parent 11e17a1a29
commit 9734b31c31
5 changed files with 15 additions and 7 deletions

View File

@@ -1463,7 +1463,7 @@ export function compileScript(
if (!hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) {
const match = filename.match(/([^/\\]+)\.\w+$/)
if (match) {
runtimeOptions += `\n name: '${match[1]}',`
runtimeOptions += `\n __name: '${match[1]}',`
}
}
if (hasInlinedSsrRenderFn) {