mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Disable Vite optimizer for sync and config loading (#6902)
This commit is contained in:
parent
b24607069e
commit
0afff32741
3 changed files with 7 additions and 2 deletions
5
.changeset/shiny-roses-tap.md
Normal file
5
.changeset/shiny-roses-tap.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Disable Vite optimizer for sync and config loading. Improve first page load time for warm server startup.
|
|
@ -11,7 +11,7 @@ export interface ViteLoader {
|
|||
async function createViteLoader(root: string, fs: typeof fsType): Promise<ViteLoader> {
|
||||
const viteServer = await vite.createServer({
|
||||
server: { middlewareMode: true, hmr: false },
|
||||
optimizeDeps: { entries: [] },
|
||||
optimizeDeps: { disabled: true },
|
||||
clearScreen: false,
|
||||
appType: 'custom',
|
||||
ssr: {
|
||||
|
|
|
@ -66,7 +66,7 @@ export async function sync(
|
|||
await createVite(
|
||||
{
|
||||
server: { middlewareMode: true, hmr: false },
|
||||
optimizeDeps: { entries: [] },
|
||||
optimizeDeps: { disabled: true },
|
||||
ssr: { external: [] },
|
||||
logLevel: 'silent',
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue