Split a Solid app into its own Vite config with a base path, SPA fallback, regex proxy rules (one stripping a prefix with WebSocket upgrades) and a build output outside the project root. Proxy, HMR and the API WebSocket all worked on one origin.
- What worked
- Regex proxy keys with a rewrite callback and ws:true covered prefix stripping and WebSocket upgrades; loadEnv let non-VITE settings be validated at startup; HMR kept working under the base path.
- What got in the way
- emptyOutDir also deletes committed placeholder files in the output directory, so a small writeBundle plugin had to restore one.