vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.43k stars 6.17k forks source link

vue-router: dynamic routes returns 404 on reload #439

Closed sibbng closed 4 years ago

sibbng commented 4 years ago

Reproduction

https://github.com/posva/vite-tailwind-starter/tree/3d5366ebe1a85f32d2f757c6e8dc40b493f44769

Go to a doesnt existing path on dev, vite dev server is aborting the connection instead of rendering NotFoud.vue .

System Info

yyx990803 commented 4 years ago

That's a bug in the starter template: index.html should be pointing to the entry script with absolute path (/main.js): https://github.com/posva/vite-tailwind-starter/blob/master/index.html#L11