vite-plugin-chrome-extension
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Vite logo



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

/vite-plugin-chrome-extension/

    Package Sidebar

    Install

    npm i vite-plugin-chrome-extension

    Weekly Downloads

    293

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    576 kB

    Total Files

    49

    Last publish

    Collaborators

    • stark.shang