Add vueperslides to noExternal in vue integration (#4639)

This commit is contained in:
Matthew Phillips 2022-09-06 11:11:01 -04:00 committed by GitHub
parent a32bbe7289
commit f08ca005e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/vue': patch
---
Mark vueperslides as a default noExternal

View file

@ -1,6 +1,7 @@
import type { Options } from '@vitejs/plugin-vue'; import type { Options } from '@vitejs/plugin-vue';
import vue from '@vitejs/plugin-vue';
import type { AstroIntegration, AstroRenderer } from 'astro'; import type { AstroIntegration, AstroRenderer } from 'astro';
import type { UserConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
function getRenderer(): AstroRenderer { function getRenderer(): AstroRenderer {
return { return {
@ -10,7 +11,7 @@ function getRenderer(): AstroRenderer {
}; };
} }
function getViteConfiguration(options?: Options) { function getViteConfiguration(options?: Options): UserConfig {
return { return {
optimizeDeps: { optimizeDeps: {
include: ['@astrojs/vue/client.js', 'vue'], include: ['@astrojs/vue/client.js', 'vue'],
@ -19,6 +20,7 @@ function getViteConfiguration(options?: Options) {
plugins: [vue(options)], plugins: [vue(options)],
ssr: { ssr: {
external: ['@vue/server-renderer'], external: ['@vue/server-renderer'],
noExternal: ['vueperslides']
}, },
}; };
} }