WXT + Svelte Extension (amgiflol)
Stack
- WXT, Svelte 5 (runes), UnoCSS,
@lucide/sveltev1 for icons - Entrypoints in src/entrypoints/ (e.g. background.ts, content.ts)
- Config in wxt.config.ts; srcDir
src, outDirdist
Scripts
| Command | Purpose |
| --------------------------- | ------------------------ |
| pnpm dev | Chrome dev (MV3) |
| pnpm dev:firefox | Firefox dev (MV2 in dev) |
| pnpm build | Chrome build (MV3) |
| pnpm build:firefox | Firefox build (MV3) |
| pnpm build:all | Both targets |
| pnpm zip / pnpm zip:all | Distribution zips |
Constraints
- Do not create new data in dev; it breaks seeding.
- Storage keys: use a fixed prefix (e.g.
amgiflol_) for all extension storage to avoid collisions with host page (see reference.md). - Extension UI in shadow DOM: isolate from host page styles (e.g. WXT ShadowRootContentScriptUiOptions) so host root font/CSS vars do not affect the UI.
Lint and format
pnpm lint(oxlint); import order and sort-imports per .oxlintrc.jsoncpnpm fmt(oxfmt);pnpm fmt:checkto check only- Tooling is kept current with oxfmt/oxlint updates; update this section when upgrading formatter or linter.
Additional context
For known issues and when to apply them (storage prefix, shadow root isolation, Firefox quirks), see reference.md.