-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Add middleware redirection in vite #2686
Conversation
const localDevelopMiddleware: PluginOption = { | ||
name: "develop-rewrite-middleware", | ||
configureServer(server) { | ||
const viteIndexPath = "/vite/index.html"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if it's local we don't need subpath handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
in this specific case when you do npm run dev
it is poping an server and redirecting you to http://localhost:5173/vite/index.html
which we use to load the app.ts
return; | ||
} | ||
|
||
console.log(req.url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the debug code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better safe on that one, it will only be visible if using local dev without the composer part.
Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
support for multiple
/
end-points so that F5 no longer fails when doing local dev with npm only (usingVITE_LOCAL_DEV
andVITE_HTTP_PROXY_TARGET
)