Skip to content

[Bug] Blank page on web app - CSP blocks SvelteKit hydration scripts #404

Description

@tazmeen24

Description

The web app at https://dev-card-web.vercel.app/ renders a blank page.
CSS loads but no JS executes - SvelteKit never hydrates.

Root Cause

svelte.config.js uses csp.mode: 'auto' with script-src: unsafe-inline.
On Vercel (serverless), the nonce in the CSP header and the injected script tag mismatch → script blocked → blank page.

Steps to Reproduce

  1. Visit https://dev-card-web.vercel.app/
  2. Open DevTools → Network tab
  3. Only 2 CSS files load, no JS, page is blank

Expected Behavior

Landing page renders normally.

Tasks

  • Fix CSP config in apps/web/svelte.config.js
  • Verify deployment renders on Vercel

Area

web

Screenshots of the issue

Image Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions