An esbuild plugin for transforming import paths and module specifiers during the build process. Current version is 1.1.1, actively maintained. It supports conditional renaming based on platform (browser/node), inline text replacements, and simple path overrides. Differentiates from generic esbuild plugins by focusing specifically on import transformation with platform-aware rules, runtime-free operation, and TypeScript type definitions included.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM-only; package is type: module, require() will throw ERR_REQUIRE_ESM.
Only default export exists; named export will be undefined.
Options type is not exported as value; use import type for TypeScript types.
Demonstrates using esbuild-plugin-import-transform to replace lodash with lodash-es, inline text for ./utils, and conditionally map node:fs to memfs when platform is browser.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.