Esbuild plugin to patch shelljs at build time, making it compatible with esbuild by adding missing `.js` extensions to dynamic imports. Current version 1.1.2. Release cadence is low, as the plugin is stable. Key differentiator: solves a specific esbuild + shelljs bundling issue (extensions) without forking or modifying shelljs source. Alternatives: using `require('shelljs')` in Node.js or bundling with other tools like Webpack, but this plugin integrates cleanly into esbuild's plugin system.
npm install esbuild-plugin-shelljsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of the shellJsPlugin in an esbuild build script to resolve shelljs dependencies.
For other packages, consider a generic esbuild-ignore or resolve alias.
Ensure esbuild version is >= 0.9.
Add shelljs as a dependency (npm install shelljs).
Use the esbuild-plugin-shelljs plugin to patch shelljs.
Run npm install shelljs (or ensure it's in package.json).
Use import { shellJsPlugin } from 'esbuild-plugin-shelljs' (named export).