Skip to content
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

localhost:4200/tests (without trailing slash) not working with Vite #2150

Open
simonihmig opened this issue Oct 9, 2024 · 1 comment
Open

Comments

@simonihmig
Copy link
Collaborator

Just a minor DX issue, but I think worth tackling: when you open localhost:4200/tests Vite will serve the main index.html, and the Ember app will error with an UnrecognizedURLEerror. However, with a trailing slash, it will serve tests/index.html as expected.

I wonder if we should provide a vite plugin with a server middleware to do a redirect for this very common case, since this works ootb with Ember CLI!?

@patricklx
Copy link
Contributor

Yes, i also think this is a good idea .
Could probably be added here

server.middlewares.use((req, res, next) => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants