An ESM-only, Deno-first esbuild plugin that generates bookmarklet code from JavaScript entry points. Current stable version 1.1.0 (2024) is covered by semver. It wraps esbuild output into a URL-encoded bookmarklet, requiring `iife` format and `write: false`. Differentiators: Deno-first (supports Node), simple setup, supports multiple entry points since v1.1.0.
npm install esbuild-plugin-bookmarkletNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Node ESM build script that outputs a bookmarklet from index.js.
Set write: false in esbuild options.
Specify format: 'iife' in esbuild config.
Use import with version tag: https://deno.land/x/esbuild_plugin_bookmarklet@1.1.0/mod.js
Use import syntax. If in Node, ensure 'type': 'module' in package.json or rename file to .mjs.
Upgrade to v1.1.0 or later for multiple entry points.
Run 'npm install esbuild-plugin-bookmarklet' and use correct import: import bookmarkletPlugin from 'esbuild-plugin-bookmarklet'
Use default import: import bookmarkletPlugin from 'esbuild-plugin-bookmarklet' (no braces).
Add format: 'iife' to esbuild options.
Add write: false to esbuild options.