-
-
Notifications
You must be signed in to change notification settings - Fork 437
index.js
in root of routes
creates incorrect server route mapping
#624
Comments
As a workaround I can advice you to put all api related routes under |
@artemjackson thanks - it's not an API route though. I want to redirect my I'm using an empty svelte component as a workaround, which does a redirect in its preload. |
Well, let me clarify something In a sapper app routes with the Routes with the So you are doing right by placing a redirect in a client-side route |
@artemjackson Yes that's right,
None of this is in dispute, however. This bug relates to the way that Sapper's routing mechanism is interpreting a file in the root of the routes directory. It is incorrectly interpreting |
I finally got the point :) Thanks for use-case clarification |
Fixes sveltejs#624. Treats both page and server routes similarly in regards to indexes and trailing slashes. It's a breaking change: `routes/page.ext.{svelte,html}` will no longer accept trailing slashes, and `routes/server.js` will. We need a proper way to configure clean urls behavior.
Fixes sveltejs#624. Treats both page and server routes similarly in regards to indexes and trailing slashes. It's a breaking change: `routes/page.ext.{svelte,html}` will no longer accept trailing slashes, and `routes/server.js` will. We need a proper way to configure clean urls behavior.
Fixes sveltejs#624. Treats both page and server routes similarly in regards to indexes and trailing slashes. It's a breaking change: `routes/page.ext.{svelte,html}` will no longer accept trailing slashes, and `routes/server.js` will. We need a proper way to configure clean urls behavior.
Fixes sveltejs#624. Treats both page and server routes similarly in regards to indexes and trailing slashes. It's a breaking change: `routes/page.ext.{svelte,html}` will no longer accept trailing slashes, and `routes/server.js` will. We need a proper way to configure clean urls behavior.
I'm trying to redirect the
/
route in a sapper project, by creating a server route asindex.js
in the root of/routes
.The structure of this would look like:
Upon doing so,
/
returns a 404 and the generated route inserver.js
is:I would expect the generated route pattern to be
/^\/$/
instead of/^\/index$/
.The text was updated successfully, but these errors were encountered: