Install
With npm (recommended)
Use this if you use a bundler (Vite, Webpack, Rollup), WXT, Plasmo, or similar.
bash
npm install @moderok/sdkjs
import { Moderok } from "@moderok/sdk";Types ship with the package.
Using WXT? You can use @wxt-dev/analytics with the Moderok provider instead of this package. See WXT.
Without a bundler
Copy moderok.js or moderok.min.js from the package’s dist/ folder (or from GitHub releases) into your extension.
js
import { Moderok } from "./moderok.min.js";If the service worker uses import, set "type": "module" on the background entry in manifest.json as usual for your setup.