parent
fbae2bc52f
commit
fd0e9ce605
2 changed files with 18 additions and 14 deletions
|
@ -55,14 +55,16 @@ class AstroBuilder {
|
||||||
const { logging, origin } = this;
|
const { logging, origin } = this;
|
||||||
const timer: Record<string, number> = { viteStart: performance.now() };
|
const timer: Record<string, number> = { viteStart: performance.now() };
|
||||||
const viteConfig = await createVite(
|
const viteConfig = await createVite(
|
||||||
{
|
vite.mergeConfig(
|
||||||
mode: this.mode,
|
{
|
||||||
server: {
|
mode: this.mode,
|
||||||
hmr: { overlay: false },
|
server: {
|
||||||
middlewareMode: 'ssr',
|
hmr: { overlay: false },
|
||||||
|
middlewareMode: 'ssr',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
...(this.config.vite || {}),
|
this.config.vite || {}
|
||||||
},
|
),
|
||||||
{ astroConfig: this.config, logging }
|
{ astroConfig: this.config, logging }
|
||||||
);
|
);
|
||||||
const viteServer = await vite.createServer(viteConfig);
|
const viteServer = await vite.createServer(viteConfig);
|
||||||
|
|
|
@ -222,14 +222,16 @@ export class AstroDevServer {
|
||||||
|
|
||||||
private async createViteServer() {
|
private async createViteServer() {
|
||||||
const viteConfig = await createVite(
|
const viteConfig = await createVite(
|
||||||
{
|
vite.mergeConfig(
|
||||||
mode: 'development',
|
{
|
||||||
server: {
|
mode: 'development',
|
||||||
middlewareMode: 'ssr',
|
server: {
|
||||||
host: this.hostname,
|
middlewareMode: 'ssr',
|
||||||
|
host: this.hostname,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
...(this.config.vite || {}),
|
this.config.vite || {}
|
||||||
},
|
),
|
||||||
{ astroConfig: this.config, logging: this.logging, devServer: this }
|
{ astroConfig: this.config, logging: this.logging, devServer: this }
|
||||||
);
|
);
|
||||||
const viteServer = await vite.createServer(viteConfig);
|
const viteServer = await vite.createServer(viteConfig);
|
||||||
|
|
Loading…
Reference in a new issue