ESBuild plugin that removes duplicate require statements from minified builds, reducing bundle size. Version 0.0.0 is the initial release. It works by detecting and deduplicating repeated require() calls in the output, which can occur when multiple modules import the same dependency. Different from many plugins, it focuses specifically on the final bundle output rather than during tree-shaking. Ships TypeScript types.
npm install esbuild-plugin-remove-multiple-requireNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Uses rdiPlugin in an esbuild build to remove duplicate require statements from the bundled output.
Place rdiPlugin last in the plugins array.
Install as 'esbuild-plugin-rdi'. Import from 'esbuild-plugin-rdi'.
npm install esbuild-plugin-rdi
import { rdiPlugin } from 'esbuild-plugin-rdi'No dependency data recorded yet.