0.1.0 • Published 5 months ago
@addonbone/reg-cs-plugin v0.1.0
@addonbone/reg-cs-plugin
Register Content Scripts plugin for Addon Bone. Automatically injects JS and CSS assets declared under content_scripts
in your extension manifest.
Installation
npm install @addonbone/reg-cs-plugin
# or
yarn add @addonbone/reg-cs-plugin
Usage
In your adnbn.config.ts
:
import {defineConfig} from 'adnbn';
import registerContentScriptPlugin from '@addonbone/reg-cs-plugin';
export default defineConfig({
plugins: [registerContentScriptPlugin()],
// other Addon Bone settings...
});
Example manifest.json
{
"content_scripts": [
{
"matches": ["https://example.com/*"],
"js": ["content-script.js"],
"css": ["styles.css"],
"all_frames": false
}
]
}
License
MIT © Addon Bone