fork from rollup-plugin-chrome-extension and evolve for
vite
andChrome Extension Manifest V3
npm install -D vite-plugin-chrome-extension
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()
],
})
- support sass/less in manifest.json