MCPcopy Create free account
hub / github.com/StarkShang/vite-plugin-chrome-extension

github.com/StarkShang/vite-plugin-chrome-extension @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
247 symbols 852 edges 283 files ⚖ MIT 4 documented · 2% updated 3y ago★ 49224 open issues

Browse by type

Functions 208 Types & classes 39
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<a href="#" target="_blank" rel="noopener noreferrer">
    <img width="180" src="https://github.com/StarkShang/vite-plugin-chrome-extension/raw/main/docs/icons/logo.png" alt="Vite logo">
</a>

vite-plugin-chrome-extension

fork from rollup-plugin-chrome-extension and evolve for vite and Chrome 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

Examples from chrome-extensions-samples are test

Examples with Vue

Examples with Svelte

Feedback

If you have problems using this plugin, welcome to let us know.

Known problems

Change logs

see CHANGELOG.md

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 178
Method 30
Interface 23
Class 16

Languages

TypeScript100%

Modules by API surface

src/manifest-input/manifest-parser/permissions.ts46 symbols
src/processors/manifest.ts16 symbols
src/html-inputs/cheerio.ts14 symbols
src/utils/helpers.ts12 symbols
src/index.ts11 symbols
src/processors/html.ts10 symbols
src/processors/permission.ts9 symbols
__fixtures__/utils.ts7 symbols
src/processors/background/background.ts6 symbols
src/plugin-reloader-simple/index.ts6 symbols
src/plugin-options.ts6 symbols
src/manifest.d.ts6 symbols

For agents

$ claude mcp add vite-plugin-chrome-extension \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page