esbuild-plugin-external-global
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

esbuild-plugin-external-global

External modules as global variables with esbuild.

Install

yarn add -D esbuild-plugin-external-global

or

npm i -D esbuild-plugin-external-global

Usage

Add to your esbuild plugins list:

const esbuild = require("esbuild");
const { externalGlobalPlugin } = require("esbuild-plugin-external-global");

esbuild.build({
  ...
  plugins: [
    externalGlobalPlugin({
      'react': 'window.React',
      'react-dom': 'window.ReactDOM',
      'jQuery': '$'
    })
  ]
  ...
});

Readme

Keywords

Package Sidebar

Install

npm i esbuild-plugin-external-global

Weekly Downloads

11,744

Version

1.0.1

License

MIT

Unpacked Size

4.2 kB

Total Files

6

Last publish

Collaborators

  • yanm1ng1121