Clean up dev mode #253
wmertens
started this conversation in
Proposals For Qwik
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
Vite dev mode can be done better
What's the motivation for this proposal?
Right now, dev mode replaces the vite devserver with a custom one. This is done in the qwikVite plugin. It uses
src/entry.ssrto implement SSR, and adds dev helpers like checking image sizing, click-to-component etc.Furthermore, there's a devserver for qwik router, which mostly duplicates what the qwikRouter plugin does.
Proposed Solution / Feature
Instead, there should be two dev approaches:
Start with 1:
server.watcherto watch the route directories for changes, invalidating the qwik router BuildContext when index/layout files are added/removed/changedsrc/index.htmlwith an embedded render script that renderssrc/rootand a vite config that uses it as an entry point, no runnableDevEnvironment neededFor 2:
entry.server, and call that from vite for every ssr requestA note on CSS: in production, qwik serves all css files it finds in assets. In dev mode, vite serves all css that is imported without
?inlineby the used files.Links / References
No response
Beta Was this translation helpful? Give feedback.
All reactions