Build a Chrome Extension with Vite.
English | 简体中文
# npm
npm install vite-plugin-crx-mv3 -D
# or yarn
yarn add vite-plugin-crx-mv3 -D
# or pnpm
pnpm add vite-plugin-crx-mv3 -D
number
8181
Create a websocket connection. Notify Chrome extension clients to reload when changes are made to the content_scripts and service_worker files.
string
true
Path to the chrome extension's manifest.json
blooen
true
Control automatic page loading in dev environment
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import crx from 'vite-plugin-crx-mv3'
export default defineConfig({
plugins: [
vue(),
crx({
manifest: './src/manifest.json'
}),
],
})
# development
npm run dev
# production
npm run build
Check out the examples in this repo.
examples/crx-vue-drawer