Skip to content

Commit

Permalink
fix: ensure consistent user template options when reusing AST
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jan 6, 2024
1 parent f1d8b96 commit 33a5306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/utils/descriptorCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ const prevCache = new Map<string, SFCDescriptor | undefined>()
export function createDescriptor(
filename: string,
source: string,
{ root, isProduction, sourceMap, compiler }: ResolvedOptions,
{ root, isProduction, sourceMap, compiler, template }: ResolvedOptions,
hmr = false,
): SFCParseResult {
const { descriptor, errors } = compiler.parse(source, {
filename,
sourceMap,
templateParseOptions: template?.compilerOptions,
})

// ensure the path is normalized in a way that is consistent inside
Expand Down

0 comments on commit 33a5306

Please sign in to comment.