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

webpack-dev-server cant open non primary url #49

Open
alishi973 opened this issue Jan 31, 2022 · 1 comment
Open

webpack-dev-server cant open non primary url #49

alishi973 opened this issue Jan 31, 2022 · 1 comment

Comments

@alishi973
Copy link

Describe the Bug:

Recently I tried to create a simple web application with svelte (and especially with this webpack template)
But when I added svelte-navigator and used history API, this problem happened to me:
Cannot GET /XYZ

Reproduction:

First clone and install dependencies:

git clone https://github.com/alishi973/webpack-svelte-devserver-routing
cd webpack-svelte-devserver-routing
yarn // or npm install

then open Login Page and use the Go to register Link (or you can manually type /register)
and finally, refresh the page and the problem accured.

Expected Behavior:

Open register page normally!
this is annoying during development to go on the primary route and then try to reach some page after a hard refresh

@Conduitry
Copy link
Member

To align with the Rollup template (https://github.com/sveltejs/template/#single-page-app-mode) we shouldn't add this as a default, specifically because it would only affect dev mode, leading people to not be aware of the necessary server configuration until they were already in production. This conversation has come up several times in the Rollup template.

It would probably be worthwhile to put a similar section in this template's readme, though, directing people to edit the appropriate configuration if they do need SPA behavior.

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

Successfully merging a pull request may close this issue.

2 participants