Skip to content

Commit 67b1d0b

Browse files
wip: comments the hack
1 parent 764cd14 commit 67b1d0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ async function createSFCModule(source : string, filename : string, options : Opt
542542
const hasScoped = descriptor.styles.some(e => e.scoped);
543543
const scopeId = `data-v-${componentHash}`;
544544

545-
545+
// hack: asynchronously preloads the language processor before it is required by the synchronous preprocessCustomRequire() callback, see below
546546
if ( descriptor.template && descriptor.template.lang )
547547
await loadModule(descriptor.template.lang, options);
548548

@@ -661,6 +661,7 @@ async function createSFCModule(source : string, filename : string, options : Opt
661661

662662
for ( const descStyle of descriptor.styles ) {
663663

664+
// hack: asynchronously preloads the language processor before it is required by the synchronous preprocessCustomRequire() callback, see below
664665
if ( descStyle.lang )
665666
await loadModule(descStyle.lang, options);
666667

0 commit comments

Comments
 (0)