-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected behavior when run npm run dev
after set config.paths.base in svelte.config.js
#2465
Comments
We just released a change affecting |
@benmccann @Karlinator thanks. Do you mind show me the command to upgrade to the latest version? |
@xcao38 #2409 isn't merged yet, so you won't get it even with upgrading. It'll probably be live soon-ish though. If your |
Not according to the issue report which says its an issue in dev and preview:
|
Ugh, my eyes betray me. There might be a similar issue in the dev server, I haven't looked. I'm not as familiar with Vite and all that, but that would be my guess. There is this line: kit/packages/kit/src/core/dev/index.js Line 296 in 7dec53e
Maybe assets are rejected at that point? |
@xcao38 do you have the full path of the files the browser is requesting? Is it requesting all assets in the correct locations ( If those paths are all correct then I think we have one bug in preview (already known) and a separate but similar bug in dev (manifests the same, but caused differently since dev and preview servers are quite different internally, what with Vite etc). |
I could show you my file structure. Not sure where to find the files... Let me know if you need anything :) |
I meant the network log from the browser 😅 I want to see if the links and source urls embedded into the page are correct. In your devtools 'Network' tab you can click on the requests and just see if the Request URLs all have '/testdir/' in them. They should look like |
|
Hi @Karlinator thanks for the quick turnaround! Just curious, is there a timeline on releasing the new updates on |
The pretender change is in 170 and the preview mode change is in 171: https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md |
I don't think 170 or 171 actually fixes the dev mode issue here. 170 fixed an issue in pre-rendering, 171 fixed an issue in the preview server. I haven't had time to reproduce and go digging, but it looks like there's a separate issue in the dev server. |
@benmccann @Karlinator Thanks both for your time! FWIW, I upgraded my sveltekit to 171 with following: Then I run Broswer:Console:Terminal:
My package.json
|
I believe you need the trailing slash, so |
Thank you! very helpful. Yeah it did the trick:) |
npm run dev
and npm run build
after set config.paths.base in svelte.config.jsnpm run dev
after set config.paths.base in svelte.config.js
This is still an issue in 177. Once you revert to Vite for previewing, will this fix the issue when there is no trailing |
I don't think we'll use Vite for preview mode actually. What they do for their |
Closing this as a duplicate of #2958 |
Describe the bug
After set config as following in svelte.config.js:
npm run dev
:In
http://localhost:3000/testdir
, I got the following:npm run build
&npm run preview
:Reproduction
Step 1: start a sveltekit app: https://kit.svelte.dev/
Step 2: change
svelte.config.js
to following:Step 3: install @sveltejs/adapter-node
Then run
npm run dev
ornpm run build
andnpm run preview
.Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
We are trying to release a sveltekit app under a sub url. This is seriously blocking our deployment.
The text was updated successfully, but these errors were encountered: