Add vueperslides to noExternal in vue integration (#4639)
This commit is contained in:
parent
a32bbe7289
commit
f08ca005e2
2 changed files with 9 additions and 2 deletions
5
.changeset/little-boats-happen.md
Normal file
5
.changeset/little-boats-happen.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/vue': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Mark vueperslides as a default noExternal
|
|
@ -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']
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue