Force Vite to rebuild dependencies (#1670)
This commit is contained in:
parent
5477dc19c2
commit
7f74388896
1 changed files with 4 additions and 4 deletions
|
@ -50,14 +50,14 @@ export async function createVite(inlineConfig: ViteConfigWithSSR, { astroConfig,
|
||||||
publicDir: fileURLToPath(astroConfig.public),
|
publicDir: fileURLToPath(astroConfig.public),
|
||||||
root: fileURLToPath(astroConfig.projectRoot),
|
root: fileURLToPath(astroConfig.projectRoot),
|
||||||
server: {
|
server: {
|
||||||
/** disable HMR for test */
|
force: true, // force dependency rebuild (TODO: enabled only while next is unstable; eventually only call in "production" mode?)
|
||||||
hmr: process.env.NODE_ENV === 'test' || process.env.NODE_ENV === 'production' ? false : undefined,
|
hmr: process.env.NODE_ENV === 'test' || process.env.NODE_ENV === 'production' ? false : undefined, // disable HMR for test
|
||||||
/** handle Vite URLs */
|
// handle Vite URLs
|
||||||
proxy: {
|
proxy: {
|
||||||
// add proxies here
|
// add proxies here
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/** Note: SSR API is in beta (https://vitejs.dev/guide/ssr.html) */
|
// Note: SSR API is in beta (https://vitejs.dev/guide/ssr.html)
|
||||||
ssr: {
|
ssr: {
|
||||||
external: [...ALWAYS_EXTERNAL],
|
external: [...ALWAYS_EXTERNAL],
|
||||||
noExternal: [...ALWAYS_NOEXTERNAL],
|
noExternal: [...ALWAYS_NOEXTERNAL],
|
||||||
|
|
Loading…
Reference in a new issue