Preact Router New Tab
Replaces your new tab page with a small Preact app you can navigate across routes.
Runs on Chrome, Edge, Firefox · Manifest V3 · Surfaces: new tab, background service worker · Styling: CSS · Level: beginner · Framework: preact
Create this project
npx extension@latest create my-newtab-preact-router --template newtab-preact-router
cd my-newtab-preact-router
npm install
npm run dev
What it is for
- A multi-route new tab app with client-side routing
- Hash routing in Preact inside an extension page
- Reference for routing with no server under MV3
First steps
- Run npm run dev to launch the extension
- Open a new tab and follow the links to move between routes
- Add a route in src/newtab/NewTabApp.tsx and it renders with no server
Permissions it asks for
This template requests no permissions.
Source on GitHubDocumentation
extension.devDocumentation for extension.dev