Closed shinokada closed 2 weeks ago
Using vite-plugin-inspect
, the dynamic import was transform from:
const post = await import(`../${params.slug}.svelte`);
const post = await __variableDynamicImportRuntimeHelper((import.meta.glob("../*.svelte")), `../../../\(app\)/dir-1/${params.slug}.svelte`, 6);
The second parameter is likely incorrect, and the (app)
probably interferes with it. The relevant code is at here.
It looks like a similar issue was reported here and this is still open:
Duplicate of #11824
Describe the bug
I put this issue to Svelte, but they think it might be a Vite bug.
I use the following code for
[slug]
dir:I have exactly the same directories except one has a group routing:
dir-2
works butdir-1
returns the following error:Reproduction
https://www.sveltelab.dev/7h5wu99oqiwukqn?files=.%2Fbuilt%2Foutput%2Fserver%2Fentries%2Fpages%2F%28app%29%2Fdir-1%2F_slug_%2F_page.ts.js%2C.%2Fbuilt%2Foutput%2Fserver%2Fentries%2Fpages%2Fdir-2%2F_slug_%2F_page.ts.js
Steps to reproduce
Reproduction method 1
Use the above reproduction:
Reproduction method 2
Go to http://localhost:5173/dir-2/test to see it is working. Go to http://localhost:5173/dir-1/test to see the error.
System Info
Used Package Manager
pnpm
Logs
No response
Validations