Files
excalidraw-box/package.json
ruinivist 17d01aff21 fix: properly bundle and cache frontend assets
- Build frontend assets natively with Bun to dist/public/ via `src/index.html` entrypoint
- Serve static assets in production with `Cache-Control: public, max-age=31536000, immutable` caching headers
- Preserve native `bun run dev` routing for seamless HMR by retaining development mode conditions in the server router
- Exclude `index.html` from long-term cache headers to allow for production updates
2026-05-29 18:14:25 +00:00

24 lines
694 B
JSON

{
"name": "excali",
"type": "module",
"private": true,
"scripts": {
"dev": "bun --hot src/server.tsx",
"build": "rm -rf dist && bun build --minify --target=browser ./src/index.html --outdir ./dist/public && bun build --target=bun ./src/server.tsx --outdir ./dist",
"start": "cd dist && DATABASE_PATH=../data/excalidraw.sqlite bun ./server.js",
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@excalidraw/excalidraw": "^0.18.1",
"react": "^19.2.6",
"react-dom": "^19.2.6"
},
"devDependencies": {
"@types/bun": "^1.3.14",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"typescript": "^5.9.3"
}
}