Skip to content

Commit

Permalink
Update vite config to ensure proper base URL handling
Browse files Browse the repository at this point in the history
  • Loading branch information
OLILHR committed Oct 29, 2024
1 parent 40146fc commit fc19843
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
15 changes: 13 additions & 2 deletions staticwebapp.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
"navigationFallback": {
"rewrite": "/index.html",
"exclude": [
"/images/*.{png,jpg,gif,ico}",
"/*.{css,scss,js,png,jpg,gif,ico,svg}"
"/static/*",
"/favicon/*",
"/*.{png,jpg,gif,ico,css,scss,js,svg}",
"/ebd/*/*.svg"
]
},
"routes": [
{
"route": "/ebd",
"serve": "/index.html",
"statusCode": 200
},
{
"route": "/ebd/*",
"serve": "/index.html",
Expand All @@ -16,5 +23,9 @@
"mimeTypes": {
".json": "text/json",
".svg": "image/svg+xml"
},
"globalHeaders": {
"cache-control": "no-cache",
"Access-Control-Allow-Origin": "*"
}
}
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ import { defineConfig } from "vite";

export default defineConfig({
plugins: [sveltekit()],
server: {
fs: {
allow: ["static"],
},
},
build: {
sourcemap: true,
},
});

0 comments on commit fc19843

Please sign in to comment.