happyDomain/web
Pierre-Olivier Mercier 96935f11c5
All checks were successful
continuous-integration/drone/push Build is passing
web: recover stale cached clients after deploy instead of freezing
The SPA references content-hashed bundles under /_app/immutable/ embedded
in the binary. After a deploy the binary ships new hashes and drops the old
ones, so a browser reusing a cached HTML page (or a stale /_app bundle)
requests hashes that 404: the page renders but the app never starts, leaving
it visible but frozen.

- routes.go: serve the page HTML (and the rewritten manifest.json) with
  Cache-Control no-cache so clients always revalidate and load a page that
  points at bundles which actually exist; /_app/* stays immutable.
- routes.go: when a missing /_app/immutable/*.js is requested (a stale cached
  client), return a self-healing reload module (200) instead of a dead 404 so
  already-stuck clients recover on their own.

The reload module is issued synchronously and throws at the end of evaluation
so the failing import() rejects: SvelteKit's bootstrap never reaches
kit.start(...), avoiding a "kit.start is not a function" TypeError. We do not
touch the Cache Storage API: the service worker manages its own cache
lifecycle and async caches.* work would lose the race against kit.start.
2026-06-14 21:44:20 +09:00
..
src web: fix service update navigating to stale zone after edit 2026-06-13 16:15:10 +09:00
static Reformat manifest.json, add id and fix spelling 2026-03-01 17:40:20 +07:00
.gitignore web: Migrate frontend to openapi-ts code generation 2026-01-26 12:34:55 +08:00
.prettierignore refactor: restructure project architecture and folder hierarchy 2025-05-28 22:00:02 +02:00
assets-noui.go mailer: Implement asset directory fallback and update build paths 2026-01-02 20:49:46 +07:00
assets.go ci: fix pipeline inconsistencies and improve Docker builds 2026-05-10 20:17:55 +08:00
generate_npm.go ci: fix pipeline inconsistencies and improve Docker builds 2026-05-10 20:17:55 +08:00
openapi-ts.config.ts Add format:"date-time" struct tags to time.Time model fields 2026-04-04 22:05:28 +07:00
package.json chore(deps): replace svelte-preprocess with vitePreprocess 2026-05-25 11:30:36 +08:00
README.md refactor: restructure project architecture and folder hierarchy 2025-05-28 22:00:02 +02:00
routes.go web: recover stale cached clients after deploy instead of freezing 2026-06-14 21:44:20 +09:00
svelte.config.js chore(deps): replace svelte-preprocess with vitePreprocess 2026-05-25 11:30:36 +08:00
tsconfig.json refactor: restructure project architecture and folder hierarchy 2025-05-28 22:00:02 +02:00
vite.config.ts refactor: restructure project architecture and folder hierarchy 2025-05-28 22:00:02 +02:00

create-svelte

Everything you need to build a Svelte project, powered by create-svelte.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.