-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Can't build if the base is changed #5465
Comments
In these two issues, they are able to build their apps even with a different base, which is weird.
Because |
This...
...is expected — your There's no |
Ah! Got it. I just assumed that it would handle different roots automatically, sorry about that. I think that a note could be added in cases where the base is changed. For example:
On that subject, is there a way to access environment variables like Vite does in Right now, I've got something like this: import { loadEnv } from 'vite';
const env = loadEnv(process.env.NODE_ENV ?? 'development', process.cwd()); |
So is there any solution to it? How do I make all root-relative links include the new base? |
<script>
import { base } from '$app/paths';
</script>
<a href="{base}/wheee">i am a link</a> |
@Rich-Harris this deploys the site but styles in the |
Is your |
* make 404 more helpful if paths.base is missing - closes #5465 * Update packages/kit/src/core/prerender/prerender.js Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * just pass config as an argument, silly * Update packages/kit/src/core/prerender/prerender.js Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> * tidy up Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Describe the bug
It doesn't seem possible to build the project if the base is different from
/
.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-e2xkzk?file=svelte.config.js
Logs
System Info
Severity
serious, but I can work around it
Additional Information
https://kit.svelte.dev/docs/configuration#paths
I'm trying to serve an app from a base that's not
/
but I can't get it to build because of a mysterious[vite-plugin-svelte-kit] 404
error.Additionally, I can't find a
<base />
tag in the<head>
when runningpnpm run dev
The text was updated successfully, but these errors were encountered: