You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When developing my frontend code, I like having my backend serve the dev assets like in production. In webpack, I can do this by configuring the middleware settings. This helps because I can use relative paths from the frontend to the backend, i.e. /api.
Describe the proposed solution
I believe SvelteKit just needs to honor the config "vite.server.middlewareMode = ssr" in svelte.config.js. Though #2232 make this seem like it may be harder to do.
Alternatives considered
I could try doing HTTP proxying from my backend to the frontend, it's just a pain to wire up.
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered:
I don't know how this would work, since one of the core ideas of Vite's dev mode is that pretty much everything is only transformed on-demand when a page you visit needs it.
The middlewareMode setting doesn't seem related to this as far as I can tell.
I don't see this being possible either. One of the reason Vite is fast is because it doesn't rely on the filesystem for dev mode and keep things in memory. A lot of stuff happens in memory and today it's not really possible to serialize them into the filesystem, and to be run separately via a node server for example. Adding in adapters, it sounds like it would open a can of worms. Hence, I don't think this is something worth pursuing at the moment.
Describe the problem
When developing my frontend code, I like having my backend serve the dev assets like in production. In webpack, I can do this by configuring the middleware settings. This helps because I can use relative paths from the frontend to the backend, i.e.
/api
.Describe the proposed solution
I believe SvelteKit just needs to honor the config
"vite.server.middlewareMode = ssr"
insvelte.config.js
. Though #2232 make this seem like it may be harder to do.Alternatives considered
I could try doing HTTP proxying from my backend to the frontend, it's just a pain to wire up.
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: