-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: restart server when svelte config file changes (fixes #63) #72
Conversation
Looks like Vite is doing something similar too, so I don't think it's all too ugly. Really like the changes here, looks cleaner than vite-plugin-restart's implementation. Gonna test this locally now. |
ahhh, great. was wondering about how to clear require cache https://github.com/vitejs/vite/blob/7362e6e9a7a0f0177b467f1cf80552acf22c46a0/packages/vite/src/node/config.ts#L772 the mjs detection might be worth using too |
…kept in resolvedOptions
…-tests; add tests for svelte config watching
…closing server wasn't graceful
finally! the refactored e2e setup means vite is no longer run inline during tests but instead via execution of package.json dev or build + preview scripts. (with the exception of vite-ssr where the custom setup still needs conversion). Because the project setup no longer relies on jest to start vite, we can also use esm projects for e2e tests 🎉 |
the dynamic import with ?t= param makes the workaround even more ugly but otherwise a cache might return the old config instead of the changed one.
Tests needed, esp. to ensure that output changes due to different compiler settings are loaded in the browser.
Idea: test virtual css module exists, then switch emitCss off, test that page reloads and virtual module no longer exists.