Environment Variables
Replaces your new tab page with a page showing the extension's environment values.
Runs on Chrome, Edge, Firefox · Manifest V3 · Surfaces: new tab, background service worker · Styling: CSS · Level: beginner
Create this project
npx extension@latest create my-new-env --template new-env
cd my-new-env
npm install
npm run dev
What it is for
- Inject build-time configuration without leaking secrets
- Switch behavior per browser, mode, or deployment target
- Reference for safe env-var usage across JS, JSON, and HTML
First steps
- Copy .env.example to .env and edit the values
- Run npm run dev to launch the extension
- Open a new tab and the page reads injected EXTENSION_PUBLIC_* values
Permissions it asks for
This template requests no permissions.
Source on GitHubDocumentation
extension.devDocumentation for extension.dev