Skip to content

Commit

Permalink
fix(plugin-vue): always resolve script before compiling template (fix v…
Browse files Browse the repository at this point in the history
  • Loading branch information
rashfael committed Feb 14, 2023
1 parent 58f129e commit 304fe69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugin-vue/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
SFCTemplateCompileResults,
} from 'vue/compiler-sfc'
import type { PluginContext, TransformPluginContext } from 'rollup'
import { getResolvedScript } from './script'
import { getResolvedScript, resolveScript } from './script'
import { createRollupError } from './utils/error'
import type { ResolvedOptions } from '.'

Expand Down Expand Up @@ -68,6 +68,7 @@ export function compile(
ssr: boolean,
) {
const filename = descriptor.filename
resolveScript(descriptor, options, ssr)
const result = options.compiler.compileTemplate({
...resolveTemplateCompilerOptions(descriptor, options, ssr)!,
source: code,
Expand Down

0 comments on commit 304fe69

Please sign in to comment.