@allahbin/vite-plugin-crx-build
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Squirrel Vite Plugin File Manager

🎉 vite-plugin-crx-build 是一款用于打包CRX浏览器插件的vite插件,可以将压缩包打包成crx文件

安装

npm install @allahbin/vite-plugin-crx-build --save-dev

或者yarn

yarn add @allahbin/vite-plugin-crx-build --dev

使用方法

// Path: path/to/vite.config.ts
import {defineConfig} from 'vite';
import CrxBuild from '@allahbin/vite-plugin-crx-build';

export default defineConfig({
    plugins: [
        CrxBuild({
            keyFile: 'pem/allahbin.pem',
            contentPath: path.join(distPath, buildFileName),
            outputPath: path.join(extensionPath),
            name: buildFileName,
        })
    ]
});

参数说明

type CrxBuild = {
    /**
     * 签名文件
     */
    keyFile: string;
    /**
     * 打包后的代码文件夹
     */
    contentPath: string;
    /**
     * 打包后的crx文件夹
     */
    outputPath: string;
    /**
     * 打包后的crx文件名
     */
    name: string;
    /**
     * 更新地址
     */
    updateUrl?: string;
    /**
     * 更新描述文件
     */
    updateFilename?: string;
}

License

allahbin © 2023 - MIT License

Dependents (0)

Package Sidebar

Install

npm i @allahbin/vite-plugin-crx-build

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

15.7 kB

Total Files

9

Last publish

Collaborators

  • allahbin