New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-plugin-node-externals

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-node-externals

ESBuild plugin for node externals handing.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-9.68%
Maintainers
1
Weekly downloads
 
Created
Source

esbuild-plugin-node-externals

ESBuild plugin for node externals handing.

Usage

GitHub Repository/Homepage is private for now, if you got any troubles, just open issue in this repo.

npm i esbuild-plugin-node-externals -D
pnpm i esbuild-plugin-node-externals -D
yarn add esbuild-plugin-node-externals -D
import { build } from 'esbuild';
import { esbuildPluginNodeExternals } from 'esbuild-plugin-node-externals';

(async () => {
  const res1 = await build({
    entryPoints: ['apps/nest-app/index.ts'],
    bundle: true,
    outfile: './dist/main.js',
    plugins: [esbuildPluginNodeExternals({
      packagePaths:"apps/nest-app/package.json",
      include:["SOME_PKG_YOU_WANT_TO_INCLUDE_AT_BUNDLE"]
    })],
  });
})();

Configuration

export interface Options {
  // you package.json path(s)
  // will search for 'package.json' in same level with .git
  packagePaths?: string | string[];
  // should regard dependencies as externals
  withDeps?: boolean;
  // should regard devDependencies as externals
  withDevDeps?: boolean;
  // should regard peerDependencies as externals
  withPeerDeps?: boolean;
  // should regard optionalDependencies as externals
  withOptDeps?: boolean;
  // deps you want to include at bundle
  include?: string[];
}

Keywords

FAQs

Package last updated on 20 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc