You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a path.base all the path marked with %svelte.assets% are replaced with the path as expected.
This works great with npm run build.
However during dev mode, the static folder still represent / instead of the value of path.base.
Reproduction
Add the following configuration:
kit: {
...,
paths: {
base: '/admin',
},
}
And add <link rel="stylesheet" href="%svelte.assets%/myCSS.css" /> in app.html.
In your static folder have the following structure:
| static
|- myCss.css
The css in dev mode won't work unless you manually create the same folder
| static
|- admin
|- myCss.css
I wish to stick the file myCss.css at the root of static folder and let the magic happens to serve those file as if under paths.base (in my example /admin/myCSS.css stored in static/myCSS.css
I just came here to report this exact issue, but you already did it 👍
Issue #3232 description focuses on the static adapter, but the problem is the same for the node-adapter. Static assets location should respect paths.base.
Describe the bug
When adding a
path.base
all the path marked with%svelte.assets%
are replaced with the path as expected.This works great with
npm run build
.However during dev mode, the
static
folder still represent/
instead of the value ofpath.base
.Reproduction
Add the following configuration:
And add
<link rel="stylesheet" href="%svelte.assets%/myCSS.css" />
inapp.html
.In your
static
folder have the following structure:The css in dev mode won't work unless you manually create the same folder
I wish to stick the file
myCss.css
at the root ofstatic
folder and let the magic happens to serve those file as if underpaths.base
(in my example/admin/myCSS.css
stored instatic/myCSS.css
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
I add the path in my config for building but removing during dev. This is pretty annoying.
The text was updated successfully, but these errors were encountered: