refactor: move to use optimizeDeps.force option
This commit is contained in:
parent
f803d80fa8
commit
aab15e546a
1 changed files with 1 additions and 1 deletions
|
@ -59,6 +59,7 @@ export async function createVite(
|
||||||
clearScreen: false, // we want to control the output, not Vite
|
clearScreen: false, // we want to control the output, not Vite
|
||||||
logLevel: 'warn', // log warnings and errors only
|
logLevel: 'warn', // log warnings and errors only
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
|
force: true,
|
||||||
entries: ['src/**/*'], // Try and scan a user’s project (won’t catch everything),
|
entries: ['src/**/*'], // Try and scan a user’s project (won’t catch everything),
|
||||||
exclude: ['node-fetch'],
|
exclude: ['node-fetch'],
|
||||||
},
|
},
|
||||||
|
@ -82,7 +83,6 @@ export async function createVite(
|
||||||
'import.meta.env.SITE': astroConfig.site ? `'${astroConfig.site}'` : 'undefined',
|
'import.meta.env.SITE': astroConfig.site ? `'${astroConfig.site}'` : 'undefined',
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
force: true, // force dependency rebuild (TODO: enabled only while next is unstable; eventually only call in "production" mode?)
|
|
||||||
hmr:
|
hmr:
|
||||||
process.env.NODE_ENV === 'test' || process.env.NODE_ENV === 'production'
|
process.env.NODE_ENV === 'test' || process.env.NODE_ENV === 'production'
|
||||||
? false
|
? false
|
||||||
|
|
Loading…
Reference in a new issue