@extension-report/plasmo
v0.6.2
Published
Thin Plasmo adapter helpers for @extension-report/js.
Maintainers
Readme
@extension-report/plasmo
Small Plasmo adapter for @extension-report/js.
Install
pnpm add @extension-report/[email protected] @extension-report/[email protected]For store builds, pin exact versions in package.json, keep every
@extension-report/* package on the same version, and run
npx @extension-report/[email protected] against the built manifest before every submission. The
store-validation runbook is in the repository docs:
https://github.com/Amorem/extension.report/blob/main/docs/sdk-store-validation.md.
Background
// background.ts
import { initExtensionReportPlasmo } from "@extension-report/plasmo";
export const sdk = initExtensionReportPlasmo({
projectPublicKey: "pk_er_...",
});Keep the SDK initialized from the background service worker. Plasmo still needs the same manifest permissions as the base SDK:
{
"permissions": ["storage", "alarms"],
"host_permissions": ["https://extension.report/*"]
}Popup, Options, Or Side Panel
// popup.tsx, options.tsx, or sidepanel.tsx
import { connectExtensionReportPlasmoUiSession } from "@extension-report/plasmo";
connectExtensionReportPlasmoUiSession({
surface: "popup",
entrypoint: "action_icon",
});The adapter does not wrap Plasmo internals. It keeps the SDK as the only telemetry engine and only provides Plasmo-named entrypoint helpers.
