Skip to content

Commit

Permalink
fix: Revert "feat: support template AST reuse from Vue 3.4 parser"
Browse files Browse the repository at this point in the history
This reverts commit ba1bab9.

Fixes #322

It seems that the AST returned from https://github.com/vuejs/core/blob/a41c5f1f4367a9f41bcdb8c4e02f54b2378e577d/packages/compiler-sfc/src/parse.ts#L133-L139 gets reused in https://github.com/vitejs/vite-plugin-vue/blob/f75de2e5284af6036efa45d5c9ec37757485e3a0/packages/plugin-vue/src/template.ts#L186-L190, resulting in the second `parse` pass (called with real user
options) being skipped.

TODO: investigate the root cause further later and re-enable the
optimization.
  • Loading branch information
haoqunjiang committed Dec 29, 2023
1 parent 2b33c32 commit 5d68fbd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/plugin-vue/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ export function resolveTemplateCompilerOptions(
return {
...options.template,
id,
// @ts-ignore TODO remove ignore when dep is updated to 3.4
ast: descriptor.template?.ast,
filename,
scoped: hasScoped,
slotted: descriptor.slotted,
Expand Down

0 comments on commit 5d68fbd

Please sign in to comment.