This is a template for developing browser extensions based on Umijs with the umi-plugin-browser-extension plugin.
这是一个基于 Umijs 配合 umi-plugin-browser-extension 插件开发浏览器扩展的模板。
Clone this repository to your local machine:
git clone https://github.com/kukushouhou/umi-browser-extension-example.git
安装依赖:
cd umi-browser-extension-example
npm install
Start the development server:
npm run dev
This will launch the extension in development mode.
- Open the Extension Management page by navigating to
chrome://extensions
. - Enable Developer Mode by clicking the toggle switch next to Developer mode.
- Click the
Load unpacked
button and select thedist
directory of this project.
After loading the extension, you can test it by opening a new tab and checking the extension's functionality.
To build the extension for production, run:
npm run build
This will generate a dist
directory containing the production-ready extension files.
Contributions are welcome! Feel free to open issues and pull requests.
MIT