The webserver serves the repo checkout directly as static files, so index.html at the repo root must be the production build (pointing at hashed /assets/*.js) rather than the dev template (/src/main.tsx), which was being served with an unrecognized application/octet-stream MIME type and blocked by the browser. - Move src/, public/, scripts/, server/, package.json, vite.config.ts, tsconfig.json, .env(.example), and the dev index.html into app/. - Add app/scripts/deploy.mjs: copies app/dist/* into the repo root after every `vite build`, cleaning up stale hashed filenames. - Wire it into `npm run build` (app/package.json). - Update run.sh to operate from app/, and .gitignore for the new layout. - Commit the current build output (index.html, assets/, manifest, sw.js, workbox-*.js, favicon.svg, icons/, LICENSE) to the repo root. - Update README with the new project layout and deployment model.
30 lines
790 B
JSON
30 lines
790 B
JSON
{
|
|
"name": "hermes-pwa",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"description": "A mobile-first PWA client for a self-hosted Hermes Agent (Hermes Web UI bridge API).",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build && node scripts/deploy.mjs",
|
|
"preview": "vite preview",
|
|
"icons": "node scripts/gen-icons.mjs",
|
|
"serve": "node server/proxy.mjs",
|
|
"typecheck": "tsc -b --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"zustand": "^4.5.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.7.5",
|
|
"@types/react": "^18.3.11",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^4.3.2",
|
|
"typescript": "^5.6.2",
|
|
"vite": "^5.4.8",
|
|
"vite-plugin-pwa": "^0.20.5"
|
|
}
|
|
}
|