An esbuild plugin that removes duplicate require statements from minified builds, reducing bundle size by eliminating redundant module imports. Version 0.0.0 is the initial release. It integrates seamlessly with esbuild and tsup, supporting TypeScript out of the box. Key differentiator: focuses specifically on duplicate require removal in esbuild, filling a niche gap in build optimization. Development is active with no breaking changes yet.
npm install ep-rdiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin with esbuild to minify and remove duplicate requires from a bundle.
Ensure esbuild format is 'cjs'.
Manually verify that removed requires are safe.
Update npm package name to 'esbuild-plugin-rdi'.
Install with correct name: npm install esbuild-plugin-rdi
Use ES module import syntax: import { rdiPlugin } from 'esbuild-plugin-rdi'Use it as rdiPlugin() not just rdiPlugin