Skip to content

Commit

Permalink
Avoid vite 5.1 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jan 18, 2024
1 parent 0fa8557 commit 3a4bec2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-rivers-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Refactors Vite config to avoid Vite 5.1 warnings
2 changes: 1 addition & 1 deletion packages/astro/src/core/config/vite-load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { debug } from '../logger/core.js';
async function createViteServer(root: string, fs: typeof fsType): Promise<ViteDevServer> {
const viteServer = await createServer({
server: { middlewareMode: true, hmr: false, watch: null },
optimizeDeps: { disabled: true },
optimizeDeps: { noDiscovery: true },
clearScreen: false,
appType: 'custom',
ssr: {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export async function syncInternal(
await createVite(
{
server: { middlewareMode: true, hmr: false, watch: null },
optimizeDeps: { disabled: true },
optimizeDeps: { noDiscovery: true },
ssr: { external: [] },
logLevel: 'silent',
},
Expand Down

0 comments on commit 3a4bec2

Please sign in to comment.