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