Repository navigation
feat: package the app as a browser extension - #11
Merged
Merged
Conversation
## Summary Package the app as a Manifest V3 browser extension for Chromium browsers (Chrome, Edge, Brave, Opera). - `npm run build:extension` makes a static export (`BUILD_TARGET=extension`) and reshapes it for extension rules: renames `_next` (underscore names are reserved), externalizes every inline script (MV3 allows only same-origin scripts), drops unused `_`-prefixed routes, writes `manifest.json`, and zips the result to `dist/`. - `extension/background.js`: the toolbar button focuses the open timer tab or opens one, so two timers never race on the same data. A global shortcut can be assigned at `chrome://extensions/shortcuts`. - The shortcuts panel shows that hint when running inside the extension. - CI builds the extension and uploads the zip as an artifact. ## Testing - Lint, typecheck, unit tests and build pass. - `npm run build:extension` output served with the MV3 policy `script-src 'self'`: app loads with no CSP violations, all tabs and shortcuts work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Package the app as a Manifest V3 browser extension for Chromium browsers (Chrome, Edge, Brave, Opera).
npm run build:extensionmakes a static export (BUILD_TARGET=extension) and reshapes it for extension rules: renames_next(underscore names are reserved), externalizes every inline script (MV3 allows only same-origin scripts), drops unused_-prefixed routes, writesmanifest.json, and zips the result todist/.extension/background.js: the toolbar button focuses the open timer tab or opens one, so two timers never race on the same data. A global shortcut can be assigned atchrome://extensions/shortcuts.Testing
npm run build:extensionoutput served with the MV3 policyscript-src 'self': app loads with no CSP violations, all tabs and shortcuts work.