66
loading...
This website collects cookies to deliver better user experience
rollup-plugin-chrome-extension
, also known as RPCE. My name is Jack Steam, and I've been hard at work over the last few months adding Vite support to RPCE. So today, I'm excited to invite you to try out RPCE with Vite.npm init vite@latest
npm i rollup-plugin-chrome-extension@beta -D
vite.config.js
to match the code below.// 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()],
});
manifest.json
next to vite.config.js
.// manifest.json
{
"manifest_version": 3,
"action": { "default_popup": "index.html" }
}
npm run dev
chrome://extensions
. Make sure to turn on the developer mode switch.Chrome | Edge |
---|---|
Top right corner | Middle left sidebar |
![]() |
![]() |
dist
folder into the Extensions Dashboard to install it. Your extension icon will be in the top bar. The icon will be the first letter of the extension's name. /* App.css */
.App {
text-align: center;
+ min-width: 350px;
}