nutrition: fix embedding file paths for production and copy to dist
All checks were successful
CI / update (push) Successful in 4m42s
All checks were successful
CI / update (push) Successful in 4m42s
resolve() uses CWD which in production (adapter-node) is dist/, not the project root. Detect the correct data directory at startup and add a postbuild step to copy the embedding JSON files into dist/data/.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"dev": "vite dev",
|
||||
"prebuild": "bash scripts/subset-emoji-font.sh && pnpm exec vite-node scripts/generate-mystery-verses.ts && pnpm exec vite-node scripts/download-models.ts",
|
||||
"build": "vite build",
|
||||
"postbuild": "mkdir -p dist/data && cp src/lib/data/nutritionEmbeddings.json src/lib/data/blsEmbeddings.json dist/data/",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
|
||||
Reference in New Issue
Block a user