Skip to content

Commit f385fee

Browse files
hydratisxzz
authored andcommitted
fix: remove script setup option
1 parent e42a6e4 commit f385fee

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/compiler-sfc/src/parse.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export interface SFCParseOptions {
2222
pad?: boolean | 'line' | 'space'
2323
ignoreEmpty?: boolean
2424
compiler?: TemplateCompiler
25-
2625
defaultScriptLang?: string
27-
defaultScriptSetupLang?: string
2826
}
2927

3028
export interface SFCBlock {
@@ -99,8 +97,7 @@ export function parse(
9997
pad = false,
10098
ignoreEmpty = true,
10199
compiler = CompilerDOM,
102-
defaultScriptLang,
103-
defaultScriptSetupLang
100+
defaultScriptLang
104101
}: SFCParseOptions = {}
105102
): SFCParseResult {
106103
const sourceKey =
@@ -195,9 +192,8 @@ export function parse(
195192
case 'script':
196193
const scriptBlock = createBlock(node, source, pad) as SFCScriptBlock
197194
const isSetup = !!scriptBlock.attrs.setup
198-
199195
if (isSetup && !descriptor.scriptSetup) {
200-
scriptBlock.lang ??= defaultScriptSetupLang ?? defaultScriptLang
196+
scriptBlock.lang ??= defaultScriptLang
201197
descriptor.scriptSetup = scriptBlock
202198
break
203199
}

0 commit comments

Comments
 (0)