From 851d8a1e78d6e4b569696ecfff5b402b5475a017 Mon Sep 17 00:00:00 2001 From: userquin Date: Sun, 17 Nov 2024 16:27:25 +0100 Subject: [PATCH] fix(plugin-vue): initialize compiler correctly --- packages/plugin-vue/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index 183d3ff6..fb8318a1 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -265,8 +265,10 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { }, configResolved(config) { + const { compiler, ...rest } = options.value options.value = { - ...options.value, + compiler: compiler ?? resolveCompiler(options.value.root), + ...rest, root: config.root, sourceMap: config.command === 'build' ? !!config.build.sourcemap : true, cssDevSourcemap: config.css?.devSourcemap ?? false,