11ty / eleventy-plugin-vite

A plugin to use Vite with Eleventy
140 stars 10 forks source link

ctrl + c does not stop process when using eleventy-vite #49

Closed aloxe closed 2 months ago

aloxe commented 2 months ago

Operating system

Linux Mint 21.3 Virginia

Eleventy

3.0.0-beta.1

Describe the bug

when running eleventy with these two packages/versions "@11ty/eleventy": "^3.0.0-beta.1", "@11ty/eleventy-plugin-vite": "^5.0.0-alpha.1",

it is not possible to stop the process with Ctrl-c.

The problem was reported on a starter that uses eleventy-plugin-vite

It is still possible to kill the process with ctrl-\

Reproduction steps

install the latest eleventy-plus-vite npm install npx @11ty/eleventy --serve try to close the process with ctrl-c

Expected behavior

servers is stoped and you get back to the terminal invite

Reproduction URL

No response

Screenshots

No response

zachleat commented 2 months ago

Just to be clear—this doesn’t happen when Vite is not in play, correct?

KiwiKilian commented 2 months ago

Ctrl + c does nothing, even console doesn't show any changeand dev server is still reachable in browser?

https://github.com/matthiasott/eleventy-plus-vite/issues/17#issue-2498592024 notes it appears on start and serve.

davehulse commented 2 months ago

@KiwiKilian - to answer your question I am experiencing this using an M1 Mac on Sonoma 14.6.1 and Node v20.16.0.

hrxkr commented 2 months ago

Just to be clear—this doesn’t happen when Vite is not in play, correct?

@zachleat You're right! Only with Vite. No issues with ESbuild (v0.23.1) and 11ty 3.0.0-beta.1

Hey @KiwiKilian I am using: macOS: Ventura 13.6.9 Node: v20.17.0

KiwiKilian commented 2 months ago

I've managed to narrow down, testing with @11ty/eleventy-plugin-vite@5.0.0-alpha.4:

So we need to dig into these changes @zachleat https://github.com/11ty/eleventy/compare/v3.0.0-alpha.17...v3.0.0-alpha.18

KiwiKilian commented 2 months ago

I've nailed it down to this commit https://github.com/11ty/eleventy/commit/2b3f18b094d0ccce88f605f7e5033d32f1f2da9d. I will handle the server close within the plugin.

KiwiKilian commented 2 months ago

Released as v5.0.0-alpha.5, let me now if you are still experiencing a problem.

aloxe commented 2 months ago

bumped to alpha.5 and tested ✅