Skip to content

Commit

Permalink
fix: make adapter-static fallback for Firebase Hosting explicit; upgr…
Browse files Browse the repository at this point in the history
…ade some deps

According to the docs, it seems to be required now for SPA usage (default is undefined). adapter-static was also out-of-sync with the newest sveltekit. Vite upgrade is unrelated.
  • Loading branch information
th0rgall committed Jul 26, 2023
1 parent 46e3fde commit a42534e
Show file tree
Hide file tree
Showing 3 changed files with 475 additions and 230 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@firebase/rules-unit-testing": "^2.0.5",
"@playwright/test": "^1.29.2",
"@stripe/stripe-js": "^1.46.0",
"@sveltejs/adapter-static": "^1.0.0-next.48",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.22.3",
"@tmcw/togeojson": "^5.5.0",
"@turf/turf": "^6.5.0",
Expand Down Expand Up @@ -63,9 +63,9 @@
"svg-inline-loader": "^0.8.2",
"tslib": "^2.3.1",
"typescript": "^5.0.0",
"vite": "^4.0.4",
"vite": "^4.4.7",
"vite-bundle-visualizer": "0.6.0",
"vitest": "^0.28.2"
"vitest": "^0.33.0"
},
"type": "module",
"packageManager": "yarn@3.5.0"
Expand Down
6 changes: 4 additions & 2 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import adapter from '@sveltejs/adapter-static'; // https://www.npmjs.com/package/@sveltejs/adapter-static
// https://kit.svelte.dev/docs/adapter-static
import adapter from '@sveltejs/adapter-static';

import preprocess from 'svelte-preprocess';

Expand All @@ -16,7 +17,8 @@ const config = {
},
adapter: adapter({
pages: 'dist',
assets: 'dist'
assets: 'dist',
fallback: 'index.html'
}),

prerender: {
Expand Down
Loading

0 comments on commit a42534e

Please sign in to comment.