Merge Vite server config with existing settings#1650
Merge Vite server config with existing settings#1650alechoey wants to merge 1 commit intovanilla-extract-css:masterfrom
Conversation
|
|
@alechoey Thanks for the PR! Would it be possible for you to make a minimal reproduction of your issue? It would help me understand the problem better. As it stands, I'm hesitant to blindly spread the entire |
|
@askoufis Thanks for the feedback! I've created a minimal reproduction: Repro: https://github.com/alechoey/vanilla-extract-middleware-repro To run: git clone https://github.com/alechoey/vanilla-extract-middleware-repro
cd vanilla-extract-middleware-repro
npm install
./test-sigterm.shThe test clearly shows the issue with timestamps: Control case (NO vanilla-extract) - graceful shutdown works: With vanilla-extract - process exits immediately: At a minimum, we need to forward // In packages/compiler/src/compiler.ts
server: {
hmr: false,
watch: enableFileWatcher ? viteConfig.server?.watch : null,
middlewareMode: viteConfig.server?.middlewareMode, // Add this line
}, |
Trying to launch a vite server with
middlewareModedoesn't get propagated to the compiler vite server.Without middlewareMode, the vite server directly handles
SIGTERMand immediately exits the process. This breaks the parent server behavior (such as Fastify graceful shutdown)