@@ -99,7 +99,7 @@ export async function createSFCModule(source : string, filename : AbstractPath,
99
99
await loadModuleInternal ( { refPath : filename , relPath : descriptor . template . lang } , options ) ;
100
100
101
101
102
- const compileTemplateOptions : SFCTemplateCompileOptions | null = descriptor . template ? {
102
+ const compileTemplateOptions : SFCTemplateCompileOptions | undefined = descriptor . template ? {
103
103
// hack, since sourceMap is not configurable an we want to get rid of source-map dependency. see genSourcemap
104
104
compiler : { ...vue_CompilerDOM , compile : ( template , options ) => vue_CompilerDOM . compile ( template , { ...options , sourceMap : genSourcemap } ) } ,
105
105
source : descriptor . template . src ? ( await ( await getResource ( { refPath : filename , relPath : descriptor . template . src } , options ) . getContent ( ) ) . getContentData ( false ) ) as string : descriptor . template . content ,
@@ -118,7 +118,7 @@ export async function createSFCModule(source : string, filename : AbstractPath,
118
118
// transformAssetUrls
119
119
preprocessLang : descriptor . template . lang ,
120
120
preprocessCustomRequire : id => moduleCache [ id ] , // makes consolidate optional, see https://github.com/vuejs/vue-next/blob/15baaf14f025f6b1d46174c9713a2ec517741d0d/packages/compiler-sfc/src/compileTemplate.ts#L111-L113
121
- } : null ;
121
+ } : undefined ;
122
122
123
123
if ( descriptor . script || descriptor . scriptSetup ) {
124
124
@@ -156,7 +156,7 @@ export async function createSFCModule(source : string, filename : AbstractPath,
156
156
} ) ;
157
157
158
158
// see https://github.com/vuejs/vue-loader/blob/12aaf2ea77add8654c50c8751bad135f1881e53f/src/templateLoader.ts#L54
159
- if ( compileTemplateOptions !== null )
159
+ if ( compileTemplateOptions ?. compilerOptions !== undefined )
160
160
compileTemplateOptions . compilerOptions . bindingMetadata = scriptBlock . bindings ;
161
161
162
162
0 commit comments