mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
fix(config): prevent vite from loading config (#10360)
This commit is contained in:
parent
82d81a1485
commit
ac766647b0
2 changed files with 6 additions and 0 deletions
5
.changeset/khaki-emus-wait.md
Normal file
5
.changeset/khaki-emus-wait.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"astro": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes an issue where some CLI commands attempted to directly read vite config files.
|
|
@ -6,6 +6,7 @@ import { debug } from '../logger/core.js';
|
||||||
|
|
||||||
async function createViteServer(root: string, fs: typeof fsType): Promise<ViteDevServer> {
|
async function createViteServer(root: string, fs: typeof fsType): Promise<ViteDevServer> {
|
||||||
const viteServer = await createServer({
|
const viteServer = await createServer({
|
||||||
|
configFile: false,
|
||||||
server: { middlewareMode: true, hmr: false, watch: null },
|
server: { middlewareMode: true, hmr: false, watch: null },
|
||||||
optimizeDeps: { noDiscovery: true },
|
optimizeDeps: { noDiscovery: true },
|
||||||
clearScreen: false,
|
clearScreen: false,
|
||||||
|
|
Loading…
Reference in a new issue