Skip to content

Conversation

@kylecarbs
Copy link
Member

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

The PWA files (manifest.json, icons, service-worker.js) were not being
included in the published NPM package, causing 404 errors.

## Changes

- Updated Makefile build-static target to copy public/ contents to dist/
- Added dist/**/*.json and dist/**/*.png to package.json files field

## Testing

Verified with `npm pack --dry-run` that PWA files are now included:
- 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`_
@kylecarbs kylecarbs merged commit d101c54 into main Oct 21, 2025
9 checks passed
@kylecarbs kylecarbs deleted the manifest-404 branch October 21, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant