Skip to content

Commit d101c54

Browse files
authored
🤖 Fix PWA manifest 404 in NPM package (#366)
The PWA files (manifest.json, icons, service-worker.js) were not being included in the published NPM package, causing 404 errors when the app tries to load them. ## Problem When PWA support was added in #359, the `public/` directory files were correctly set up for local development and Electron builds, but they weren't being included in the NPM package distribution. This caused 404 errors for users installing via npm. ## Solution 1. **Updated build-static target** - Added `cp -r public/* dist/` to copy PWA assets during build 2. **Updated package.json files field** - Added `dist/**/*.json` and `dist/**/*.png` patterns to include the PWA files in the published package ## Verification Confirmed with `npm pack --dry-run`: - ✓ dist/manifest.json (790B) - ✓ dist/icon-192.png (7.8kB) - ✓ dist/icon-512.png (24.0kB) - ✓ dist/service-worker.js (1.3kB) _Generated with `cmux`_
1 parent 7f70a91 commit d101c54

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ build-static: ## Copy static assets to dist
106106
@echo "Copying static assets..."
107107
@mkdir -p dist
108108
@cp static/splash.html dist/splash.html
109+
@cp -r public/* dist/
109110

110111
# Always regenerate version file (marked as .PHONY above)
111112
version: ## Generate version file

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@
141141
"dist/**/*.wasm",
142142
"dist/**/*.html",
143143
"dist/**/*.css",
144+
"dist/**/*.json",
145+
"dist/**/*.png",
144146
"dist/assets/**/*",
145147
"README.md",
146148
"LICENSE"

0 commit comments

Comments
 (0)