Skip to content

@ not working in route paths #2401

@SleepingRobot

Description

@SleepingRobot

Describe the bug

Routes containing @ appear to have been broken in @sveltejs/kit 1.0.0-next.163 and result in a 404 error. 162 is working as expected, 163-165 reproduce the issue.

Reproduction

npm init svelte@next
npm install

create file src/routes/@test.svelte with the following contents:

<h1>@test</h1>

run npm run dev

browsing to this url http://localhost:3000/@test displays 404 Not found: /@test error page.

changing @sveltejs/kit from next to 1.0.0-next.162 in package.json, and then running npm i && npm run dev results in the @test page properly loading.

Logs

No response

System Info

System:
    OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
    CPU: (4) x64 Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
    Memory: 7.19 GB / 15.47 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.9.1 - ~/.n/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 7.23.0 - ~/.npm-global/bin/npm
  Browsers:
    Chrome: 93.0.4577.63
    Firefox: 92.0
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.165 
    svelte: ^3.34.0 => 3.42.5

Severity

serious, but I can work around it

Additional Information

I am using a src/routes/@[username] path in my application for user profile pages, and they are all resulting in 404 errors now. I can technically work around the issue by refactoring my app to use a different user profile path, but I'd really like to avoid that if possible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions