Open Fanda36 opened 3 years ago
Can you publish a repo?
Having the same requirements for our app:
/category
, /category/color_red
, /category/color_red_yellow/size_m
We don't use static export, however, the described above trick with [...args(.*)]
doesn't work with a dynamic app too and a workaround with index.svelte + [...args].svelte
causing a lot of issues in the state management and transitions, so it would be great if this could be fixed.
I've created a repo with a modified starter template to demonstrate the issue: https://github.com/zimnicky/sapper-empty-route-test
Expected behavior: /hats shouldn't return 404
Describe the bug I created universal route
routes/convert/[...format(.*)].svelte
for handling every request (convert/*
, includingconvert/
). It works on dev serversapper dev --no-hot
. When I go tolocalhost:3000/convert/
then I got result from[...format(.*)].svelte
.The problem is if I generate static web
NODE_ENV=production sapper export
, thenmypage.com/convert/
return 404 not found.To Reproduce
routes/convert/[...format(.*)].svelte
<a href="convert">test</a>
inroutes/index.svelte
NODE_ENV=production sapper export
myweb.com/convert/
return 404Expected behavior Page
myweb.com/convert/
will be rendered.Information about your Sapper Installation:
The output of
npx envinfo --system --npmPackages svelte,sapper,rollup,webpack --binaries --browsers
Your hosting environment - static
If it is an exported (
npm run export
) or dynamic application - exportedSeverity How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Sapper entirely?
index.svelte
and[...format(.*)].svelte
has same content.