Open
Description
Describe the bug
When split: true is set on the netlify adapter, routes with optional parameters cease to work when the optional parameter is not set. For example the route /collection/[[optional]]/article will fail if /collection/article (without optional parameter) is loaded through the server.
Reproduction
- Create new empty sveltekit project
- Add adpater-netlify and configure with split:true option
- Add a route with optional parameter like: /collection/[[optional]]/article
- Deploy to netlify and enter URL like /collection/article it should give 404 error.
I made a test repository and deploy:
- https://github.com/el-sonny/test-netlify-adapter-optional-params
- https://warm-flan-c838fe.netlify.app/ (has a client side navigation link which works)
- https://warm-flan-c838fe.netlify.app/collection/article (404 error when SSR)
Logs
No response
System Info
System:
OS: macOS 13.2.1
CPU: (10) arm64 Apple M1 Pro
Memory: 541.80 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Browsers:
Brave Browser: 112.1.50.119
Chrome: 112.0.5615.137
Safari: 16.3
npmPackages:
@sveltejs/adapter-auto: ^2.0.0 => 2.0.1
@sveltejs/adapter-netlify: ^1.0.0-next.88 => 1.0.0-next.88
@sveltejs/kit: ^1.5.0 => 1.15.10
svelte: ^3.54.0 => 3.58.0
vite: ^4.3.0 => 4.3.4
Severity
serious, but I can work around it
Additional Information
This issue is related: