From d54769ab12fb11ae0c8027d8ac2ebfd558040987 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 30 Mar 2026 22:28:54 +0500 Subject: [PATCH] fix: commit paraglide output to git; remove compile from prepare script paraglide-js fetches its plugin from cdn.jsdelivr.net at compile time. In CI (no outbound internet access), this silently produces an empty _index.js, causing svelte-check to fail with 'not a module' errors. Fix: - Commit all generated src/lib/paraglide/ files to git (removing the auto-generated .gitignore that was hiding them) - Simplify prepare script to only run svelte-kit sync - Add separate 'npm run paraglide' script for developers to regenerate when messages/*.json source files change --- ui/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/package.json b/ui/package.json index 88d19ce..74f6c0b 100644 --- a/ui/package.json +++ b/ui/package.json @@ -7,7 +7,8 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", - "prepare": "paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide && node -e \"const fs=require('fs'),f='./src/lib/paraglide/messages.js',c=fs.readFileSync(f,'utf8').split('\\n').filter(l=>!l.includes('export * as m')&&!l.includes('enabling auto-import')).join('\\n');fs.writeFileSync(f,c)\" && svelte-kit sync || echo ''", + "prepare": "svelte-kit sync || echo ''", + "paraglide": "paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide && node -e \"const fs=require('fs'),f='./src/lib/paraglide/messages.js',c=fs.readFileSync(f,'utf8').split('\\n').filter(l=>!l.includes('export * as m')&&!l.includes('enabling auto-import')).join('\\n');fs.writeFileSync(f,c)\"", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" },