mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Disable server.ws vite config for loading config files (#11744)
This commit is contained in:
parent
7ab0e601fd
commit
b67742961a
4 changed files with 9 additions and 3 deletions
6
.changeset/weak-masks-do.md
Normal file
6
.changeset/weak-masks-do.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'astro': patch
|
||||
'@astrojs/db': patch
|
||||
---
|
||||
|
||||
Disables the WebSocket server when creating a Vite server for loading config files
|
|
@ -7,7 +7,7 @@ import { debug } from '../logger/core.js';
|
|||
async function createViteServer(root: string, fs: typeof fsType): Promise<ViteDevServer> {
|
||||
const viteServer = await createServer({
|
||||
configFile: false,
|
||||
server: { middlewareMode: true, hmr: false, watch: null },
|
||||
server: { middlewareMode: true, hmr: false, watch: null, ws: false },
|
||||
optimizeDeps: { noDiscovery: true },
|
||||
clearScreen: false,
|
||||
appType: 'custom',
|
||||
|
|
|
@ -169,7 +169,7 @@ async function syncContentCollections(
|
|||
const tempViteServer = await createServer(
|
||||
await createVite(
|
||||
{
|
||||
server: { middlewareMode: true, hmr: false, watch: null },
|
||||
server: { middlewareMode: true, hmr: false, watch: null, ws: false },
|
||||
optimizeDeps: { noDiscovery: true },
|
||||
ssr: { external: [] },
|
||||
logLevel: 'silent',
|
||||
|
|
|
@ -222,7 +222,7 @@ async function executeSeedFile({
|
|||
async function getTempViteServer({ viteConfig }: { viteConfig: UserConfig }) {
|
||||
const tempViteServer = await createServer(
|
||||
mergeConfig(viteConfig, {
|
||||
server: { middlewareMode: true, hmr: false, watch: null },
|
||||
server: { middlewareMode: true, hmr: false, watch: null, ws: false },
|
||||
optimizeDeps: { noDiscovery: true },
|
||||
ssr: { external: [] },
|
||||
logLevel: 'silent',
|
||||
|
|
Loading…
Reference in a new issue