ESbuild plugin suite for building userscripts targeting Tampermonkey, Greasymonkey, Violentmonkey, and other userscript engines. Current stable version is 0.2.6. The package provides three distinct plugins: `userscript-inject-code` for injecting code fragments, `userscript-metadata` for generating metadata headers (e.g., @name, @match, @grant), and `userscript-proxy` to create development proxy scripts that bypass browser cache during development. Unlike general bundler plugins, this package is purpose-built for userscript workflows, supporting both CommonJS and ESM via esbuild. Key differentiators include combined or individual plugin usage, TypeScript-first design, and minimal configuration overhead.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
CommonJS require works but defaults to ESM in modern Node; named import is preferred.
No default export; must use named import. Common mistake: treating it as default export.
Sub-plugins are accessed as methods on the main `userscript` object, not as separate named exports.
Same pattern as metadata; injectCode is a method, not a top-level export.
Shows a complete esbuild build configuration using the userscript plugin to add metadata and proxy support for development.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.