Skip to content

Commit

Permalink
prepopulate resolved script cache for template transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
rashfael committed Nov 22, 2022
1 parent f40c18d commit 7d05692
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 7d05692

Please sign in to comment.