diff options
author | 2025-02-14 16:24:52 +0100 | |
---|---|---|
committer | 2025-02-14 16:24:52 +0100 | |
commit | 3842ce5ec9471d358042b3d9ef697cf06c7a91f6 (patch) | |
tree | c3e86855b995a28217ae8c6351d2926b7d7921a2 /packages/integrations/vue | |
parent | 1c941ee2adb02fbb44d9f0a047cf4815030c73af (diff) | |
download | astro-3842ce5ec9471d358042b3d9ef697cf06c7a91f6.tar.gz astro-3842ce5ec9471d358042b3d9ef697cf06c7a91f6.tar.zst astro-3842ce5ec9471d358042b3d9ef697cf06c7a91f6.zip |
fix(vue): compiler fallback (#13251)
* fix(vue): compiler fallback
* Update index.ts
Diffstat (limited to 'packages/integrations/vue')
-rw-r--r-- | packages/integrations/vue/src/index.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/integrations/vue/src/index.ts b/packages/integrations/vue/src/index.ts index f81167323..66e5d269c 100644 --- a/packages/integrations/vue/src/index.ts +++ b/packages/integrations/vue/src/index.ts @@ -106,7 +106,7 @@ async function getViteConfiguration( command: HookParameters<'astro:config:setup'>['command'], options?: Options, ): Promise<UserConfig> { - let vueOptions = { + const vueOptions = { ...options, template: { ...options?.template, @@ -114,6 +114,9 @@ async function getViteConfiguration( }, } satisfies VueOptions; + // The vue vite plugin may not manage to resolve it automatically + vueOptions.compiler ??= await import('vue/compiler-sfc'); + const config: UserConfig = { optimizeDeps: { // We add `vue` here as `@vitejs/plugin-vue` doesn't add it and we want to prevent |