Registry / devops / esbuild-plugin-browserify-adapter

esbuild-plugin-browserify-adapter

JSON →
library0.1.5jsnpmunverified

Adapter (v0.1.5, low activity) that lets you use Browserify transforms as esbuild plugins. Designed for gradual migration from Browserify to esbuild, it passes transforms in order and supports options via array wrapping. Does not support Browserify plugins. Not intended as permanent solution for heavy transform usage.

npm install esbuild-plugin-browserify-adapter
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-BRO
E
esbuild-plugin-browserify-adapter
devopsjavascriptv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const browserifyAdapter = require('esbuild-plugin-browserify-adapter')
import browserifyAdapter from 'esbuild-plugin-browserify-adapter'
CJS default export – lacks ESM entry, so import syntax fails.
browserifyAdapter
const browserifyAdapter = require('esbuild-plugin-browserify-adapter')
const { browserifyAdapter } = require('esbuild-plugin-browserify-adapter')
Package exports default function, not named export.
plugin usage
browserifyAdapter(coffeeify, [envify, opts])
browserifyAdapter(coffeeify, envify, opts)
Options must be passed as tuple: [transform, opts].

Builds an app using coffeeify and envify via the browserify adapter plugin.

const esbuild = require('esbuild'); const coffeeify = require('coffeeify'); const envify = require('envify'); const browserifyAdapter = require('esbuild-plugin-browserify-adapter'); esbuild.build({ entryPoints: ['./app.coffee'], bundle: true, plugins: [browserifyAdapter(coffeeify, [envify, { BUNDLE_TIME: new Date().toJSON() }])], outdir: './public' }).catch(() => process.exit(1));
Debug
Known issues
breakingDoes not work with Browserify plugins (only transforms).
fix
Use only Browserify transforms, not plugins like browserify-css.
affects: all
gotchaOptions must be passed as an array [transform, options] – not as separate arguments.
fix
Wrap transform and options in an array: browserifyAdapter([transform, opts])
affects: all
gotchaThe adapter is intended for migration, not permanent use with heavy transform usage (may cause performance issues or incompatibilities).
fix
Consider native esbuild plugins for long-term solutions.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'esbuild-plugin-browserify-adapter'
Package not installed or missing from node_modules.
fix
Run 'npm install esbuild-plugin-browserify-adapter -D'
TypeError: browserifyAdapter is not a function
Named import used instead of default import.
fix
Use 'const browserifyAdapter = require('esbuild-plugin-browserify-adapter')'
Error: [plugin browserify-adapter] Transform returned invalid result
Browserify transform produces output incompatible with esbuild expectations.
fix
Check transform compatibility; consult transform docs for esbuild usage.
Upgrade
Version history
0.1.5latest on npm
Audit
Dependencies
esbuildrequiredpeer dependency for plugin interface
Agent activity
4 hits · last 30 days
node
4
Resources
esbuild-plugin-browserify-adapter — npm install esbuild-plugin-browserify-adapter · libregistry