rollup-plugin-chrome-extension
The bundler configuration for a Chrome Extension can be pretty complex.
Use manifest.json
as the input. Every file in the manifest will
be bundled or copied to the output folder.
RPCE simplifies project config and supports many of Vite's features in the Chrome Extension evironment, including HMR.
Vite Usage
Vite support is in beta! Check out this 90 second getting started guide.
npm i rollup-plugin-chrome-extension@beta -D
// vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { chromeExtension } from 'rollup-plugin-chrome-extension'
export default defineConfig({
plugins: [react(), chromeExtension()],
})
Just add new features to your manifest and RPCE does the rest.
Documentation for v3
We have v3 boilerplates for React JavaScript, React TypeScript and Svelte, as well as instructions for setting up your own project.
See the documentation for usage and how to get started.
Contributing
Your help is super welcome!
Development
Our preferred package manager is pnpm, but npm or Yarn should work.
If you're using VSCode you can run the default build task (Ctrl+Shift+B or ⇧⌘B for Mac) to start building and type checking.
Change my by Jedi
- Fixed Issue 110: <all_urls> match patterns are not handled properly;