Skip to content

Commit 007f656

Browse files
Use SvelteKit assets path placeholder for static files (#2173)
* Use SvelteKit assets path placeholder for static files * Change base path conditional to ternary operator * Use logical OR operator for base path default * Set base path to /console except in preview mode * Fix base path configuration for preview environment
1 parent ab5ddc2 commit 007f656

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/app.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta
66
name="description"
77
content="Appwrite is an open-source platform for building applications at any scale, using your preferred programming languages and tools." />
8-
<link rel="icon" type="image/svg+xml" href="/console/logos/appwrite-icon.svg" />
9-
<link rel="mask-icon" type="image/png" href="/console/logos/appwrite-icon.png" />
10-
<link rel="stylesheet" href="/console/css/loading.css" />
8+
<link rel="icon" type="image/svg+xml" href="%sveltekit.assets%/logos/appwrite-icon.svg" />
9+
<link rel="mask-icon" type="image/png" href="%sveltekit.assets%/logos/appwrite-icon.png" />
10+
<link rel="stylesheet" href="%sveltekit.assets%/css/loading.css" />
1111
<meta name="viewport" content="width=device-width, initial-scale=1" />
1212
%sveltekit.head%
1313
</head>
@@ -40,13 +40,13 @@
4040
<div></div>
4141
</div>
4242
<img
43-
src="/console/images/appwrite-logo-light.svg"
43+
src="%sveltekit.assets%/images/appwrite-logo-light.svg"
4444
width="120"
4545
height="22"
4646
class="logo-light"
4747
alt="Appwrite Logo" />
4848
<img
49-
src="/console/images/appwrite-logo-dark.svg"
49+
src="%sveltekit.assets%/images/appwrite-logo-dark.svg"
5050
width="120"
5151
height="22"
5252
class="logo-dark"

svelte.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const config = {
2626
precompress: true
2727
}),
2828
paths: {
29-
base: '/console'
29+
base: process.env.PREVIEW ? '' : '/console'
3030
}
3131
},
3232
vitePlugin: {

0 commit comments

Comments
 (0)