ESBuild plugin to remove duplicate require statements from minified build.
npm install esbuild-plugin-remove-duplicate-require
     !npm bundle size 
> ESBuild plugin to remove duplicate require statements from minified build.
>
Please consider starring this repository and sharing it with your friends.
``bash`
$ pnpm add esbuild-plugin-rdi
_or_
`bash`
$ npm install esbuild-plugin-rdi
_or_
`bash`
$ yarn add esbuild-plugin-rdi
> If you are using monorepo or workspaces, you can install this plugin to the root using -w or to a specific workspace using --filter your-package or --scope your-package for pnpm or yarn workspaces, respectively.
`ts
// tsup.config.ts or tsup.config.js
import { defineConfig } from "tsup";
import { rdiPlugin } from "esbuild-plugin-rdi";
export default defineConfig(options => ({
...
esbuildPlugins:[rdiPlugin()]
}));
`
`ts
import { rdiPlugin } from "esbuild-plugin-rdi";
esbuild.build({
...
plugins: [rdiPlugin()],
});
``
Coming soon...
>
Please consider enrolling in our courses or sponsoring our work.
!Alt
This library is licensed under the MPL-2.0 open-source license.
with 💖 by Mayank Kumar Chaudhari