@@ -91,29 +91,17 @@ export function* generateTemplate(
91
91
options : ScriptCodegenOptions ,
92
92
ctx : ScriptCodegenContext ,
93
93
isClassComponent : boolean
94
- ) : Generator < Code , TemplateCodegenContext | undefined > {
94
+ ) : Generator < Code , TemplateCodegenContext > {
95
95
ctx . generatedTemplate = true ;
96
96
97
- if ( ! options . vueCompilerOptions . skipTemplateCodegen ) {
98
- const templateCodegenCtx = createTemplateCodegenContext ( {
99
- scriptSetupBindingNames : new Set ( ) ,
100
- edited : options . edited ,
101
- } ) ;
102
- yield * generateTemplateCtx ( options , isClassComponent ) ;
103
- yield * generateTemplateComponents ( options ) ;
104
- yield * generateTemplateBody ( options , templateCodegenCtx ) ;
105
- return templateCodegenCtx ;
106
- }
107
- else {
108
- const templateUsageVars = [ ...getTemplateUsageVars ( options , ctx ) ] ;
109
- yield `// @ts-ignore${ newLine } ` ;
110
- yield `[${ templateUsageVars . join ( ', ' ) } ]${ newLine } ` ;
111
- yield `return {${ newLine } ` ;
112
- yield ` slots: {},${ newLine } ` ;
113
- yield ` refs: {},${ newLine } ` ;
114
- yield ` attrs: {},${ newLine } ` ;
115
- yield `}${ endOfLine } ` ;
116
- }
97
+ const templateCodegenCtx = createTemplateCodegenContext ( {
98
+ scriptSetupBindingNames : new Set ( ) ,
99
+ edited : options . edited ,
100
+ } ) ;
101
+ yield * generateTemplateCtx ( options , isClassComponent ) ;
102
+ yield * generateTemplateComponents ( options ) ;
103
+ yield * generateTemplateBody ( options , templateCodegenCtx ) ;
104
+ return templateCodegenCtx ;
117
105
}
118
106
119
107
function * generateTemplateBody (
0 commit comments