vite-plugin-chrome-extension
fork from rollup-plugin-chrome-extension and evolve for
vite
andChrome Extension Manifest V3
Table of Contents
Installation
npm install -D vite-plugin-chrome-extension
Usage
In vite.config.ts,
// vite.config.ts
import { resolve } from "path";
import { defineConfig } from "vite";
import { chromeExtension } from "vite-plugin-chrome-extension";
export default defineConfig({
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
build: {
rollupOptions: {
input: "src/manifest.json"
}
},
plugins: [
chromeExtension()
],
})
TODO
- support sass/less in manifest.json
How does this plugin work
See Work flow
Examples
- <input checked="" disabled="" type="checkbox"> Background
Examples from chrome-extensions-samples are test
- <input checked="" disabled="" type="checkbox"> Hello World
- <input checked="" disabled="" type="checkbox"> Page Redder
- <input checked="" disabled="" type="checkbox"> Cookie Clearer
- <input checked="" disabled="" type="checkbox"> Omnibox - New Tab Search
- <input checked="" disabled="" type="checkbox"> Web Accessible Resources
Examples with Vue
- <input checked="" disabled="" type="checkbox"> Vue in Content Scripts
- <input checked="" disabled="" type="checkbox"> Vue in Full Options Page
- <input checked="" disabled="" type="checkbox"> Vue in Embedded Options Page
Examples with Svelte
- <input checked="" disabled="" type="checkbox"> Svelte
Feedback
If you have problems using this plugin, welcome to let us know.
Known problems
Change logs
see CHANGELOG.md