🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

esbuild-plugin-external-global

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-external-global

External modules as global variables

1.0.1
latest
Source
npm
Version published
Weekly downloads
13K
-1.16%
Maintainers
1
Weekly downloads
 
Created
Source

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': '$'
    })
  ]
  ...
});

Keywords

esbuild

FAQs

Package last updated on 14 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts