This guide covers how to set up your development environment, build the extension, and contribute to Enhancer.
- Clone the repository:
git clone https://github.com/enhancer-app/enhancer.git
cd enhancer- Install dependencies:
bun installRun the extension in development mode with hot reload:
bun run devThis will:
- Watch TypeScript files for changes
- Automatically rebuild on file changes
- Run a local Vite server for extension assets
After building:
Chrome/Edge/Brave:
- Open
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
dist/directory from this project
Firefox:
- Open
about:debugging - Click "This Firefox"
- Click "Load Temporary Add-on"
- Select any file in the
dist/directory
Note: If using Chrome with
bun run dev, you may need to allow Local Network Access. See Chrome Local Network Access.
Create an optimized production build:
bun run buildThis runs:
- Biome linting
- TypeScript type checking
- Vite production build
The built extension will be in the dist/ directory.
Create distribution archives for the extension:
bun run packThis command:
- Runs the production build
- Creates
dist/build-{version}.zip- The built extension ready for upload to browser stores - Creates
dist/source-{version}.zip- Source code archive (excluding node_modules, .git, and other ignored directories)
| Command | Description |
|---|---|
bun run dev |
Development mode with hot reload |
bun run build |
Production build |
bun run pack |
Create distribution packages |
bun run typecheck |
Run TypeScript type checking |
bun run typecheck:watch |
Type checking in watch mode |
bun run biome:ci |
Run linting |
- Runtime: Bun
- Language: TypeScript
- Framework: Preact (React alternative)
- Build Tool: Vite
- Linting: Biome
- Styling: styled-components
The project uses Biome for linting and formatting. Configuration is in biome.json.
Pre-commit hooks (via Husky) automatically run linting on staged files.
- Make sure you're using the
dist/directory, not the project root - Try removing the extension and re-adding it
- Check the browser console for errors
- Ensure you're using Bun (not npm/yarn/pnpm)
- Delete
dist/andnode_modules/and runbun installagain - Check that your Node.js version is compatible with Bun
- The extension uses a custom bridge element for worker communication
- Make sure no other extensions are interfering
- Try refreshing the page after rebuilding
- Read about the architecture to understand how the code is organized