esbuild-plugin-external-global

JSON →
library 1.0.1 ·javascript
verified May 1, 2026

An esbuild plugin that maps external modules to global variables, enabling bundle-size reduction by excluding dependencies like React, ReactDOM, or jQuery and referencing them via globals such as window.React. Version 1.0.1 is stable with minimal API surface. It provides a simple mapping object where keys are module names and values are global variable expressions. The plugin is commonly used in library builds where certain dependencies are provided by the host environment. It has TypeScript types and works with both CJS and ESM esbuild configurations. Compared to similar plugins like esbuild-plugin-externalize, this one focuses specifically on global variable fallbacks rather than file-based externals.

total hits 10
actors 3 distinct systems
last hit 4d ago AhrefsBot
MetaBot
3
GPTBot
2
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇪🇸 Spain