@@ -5,7 +5,7 @@ import type { ScriptSetupRanges } from '../../parsers/scriptSetupRanges';
55import type { Code , Sfc , VueCompilerOptions } from '../../types' ;
66import { codeFeatures } from '../codeFeatures' ;
77import type { TemplateCodegenContext } from '../template/context' ;
8- import { endOfLine , generateSfcBlockSection , newLine } from '../utils' ;
8+ import { generateSfcBlockSection , newLine } from '../utils' ;
99import { generateComponentSelf } from './componentSelf' ;
1010import { createScriptCodegenContext , type ScriptCodegenContext } from './context' ;
1111import { generateScriptSetup , generateScriptSetupImports } from './scriptSetup' ;
@@ -51,7 +51,7 @@ function* generateScript(
5151 yield * generateScriptSetupImports ( options . sfc . scriptSetup , options . scriptSetupRanges ) ;
5252 }
5353 if ( options . sfc . script && options . scriptRanges ) {
54- const { exportDefault, classBlockEnd } = options . scriptRanges ;
54+ const { exportDefault } = options . scriptRanges ;
5555 const isExportRawObject = exportDefault
5656 && options . sfc . script . content [ exportDefault . expression . start ] === '{' ;
5757 if ( options . sfc . scriptSetup && options . scriptSetupRanges ) {
@@ -107,24 +107,6 @@ function* generateScript(
107107 codeFeatures . all ,
108108 ) ;
109109 }
110- else if ( classBlockEnd !== undefined ) {
111- if ( options . vueCompilerOptions . skipTemplateCodegen ) {
112- yield generateSfcBlockSection ( options . sfc . script , 0 , options . sfc . script . content . length , codeFeatures . all ) ;
113- }
114- else {
115- yield generateSfcBlockSection ( options . sfc . script , 0 , classBlockEnd , codeFeatures . all ) ;
116- yield `__VLS_template = () => {${ newLine } ` ;
117- const templateCodegenCtx = yield * generateTemplate ( options , ctx ) ;
118- yield * generateComponentSelf ( options , ctx , templateCodegenCtx ) ;
119- yield `}${ endOfLine } ` ;
120- yield generateSfcBlockSection (
121- options . sfc . script ,
122- classBlockEnd ,
123- options . sfc . script . content . length ,
124- codeFeatures . all ,
125- ) ;
126- }
127- }
128110 else {
129111 yield generateSfcBlockSection ( options . sfc . script , 0 , options . sfc . script . content . length , codeFeatures . all ) ;
130112 yield * generateScriptSectionPartiallyEnding (
0 commit comments