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 - npm Package Compare versions

Comparing version 0.3.0 to 1.0.0

CHANGELOG.md

36

package.json
{
"name": "esbuild-plugin-node-externals",
"version": "0.3.0",
"version": "1.0.0",
"description": "ESBuild plugin for node externals.",

@@ -9,17 +9,21 @@ "keywords": [

],
"homepage": "https://github.com/linbudu599/nx-plugins/tree/master/packages/esbuild-plugin-copy#readme",
"homepage": "https://github.com/LinbuduLab/esbuild-plugins/tree/master/packages/esbuild-plugin-node-externals#readme",
"changelog": "https://github.com/LinbuduLab/esbuild-plugins/blob/main/packages/esbuild-plugin-node-externals/CHANGELOG.md",
"bugs": {
"url": "https://github.com/linbudu599/nx-plugins/issues"
"url": "https://github.com/LinbuduLab/esbuild-plugins/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/linbudu599/nx-plugins.git"
"url": "git+https://github.com/LinbuduLab/esbuild-plugins.git"
},
"license": "MIT",
"author": "Linbudu <linbudu599@gmail.com> (https://github.com/linbudu599)",
"main": "src/index.js",
"typings": "src/index.d.ts",
"publishConfig": {
"main": "src/index.js",
"typings": "src/index.d.ts"
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},

@@ -31,6 +35,14 @@ "dependencies": {

"peerDependencies": {
"esbuild": "^0.14.0"
"esbuild": ">= 0.14.0"
},
"scripts": {},
"readme": "# esbuild-plugin-node-externals\n\nESBuild plugin for node externals handing.\n\n- [Documentation](https://nx-plugins.netlify.app/derived/esbuild.html#node-externals).\n- [GitHub Repo](https://github.com/LinbuduLab/nx-plugins)\n- [Author](https://github.com/linbudu599)\n"
"tsup": {
"entry": "src/index.ts",
"splitting": false,
"sourcemap": false,
"clean": true
},
"scripts": {
"dev": "tsup src/index.ts --watch --dts --format esm --legacy-output",
"build": "rm -rf dist && tsup src/index.ts --dts --format esm,cjs --legacy-output"
}
}

@@ -5,4 +5,72 @@ # esbuild-plugin-node-externals

- [Documentation](https://nx-plugins.netlify.app/derived/esbuild.html#node-externals).
- [GitHub Repo](https://github.com/LinbuduLab/nx-plugins)
- [Author](https://github.com/linbudu599)
- [GitHub Repo](https://github.com/LinbuduLab/esbuild-plugins/tree/master/packages/esbuild-plugin-node-externals#readme)
- [Changelog](https://github.com/LinbuduLab/esbuild-plugins/blob/main/packages/esbuild-plugin-node-externals/CHANGELOG.md)
## Usage
```bash
npm install esbuild-plugin-node-externals --save-dev
pnpm install esbuild-plugin-node-externals --save-dev
yarn add esbuild-plugin-node-externals --save-dev
```
```typescript
import { build } from 'esbuild';
import { nodeExternals } from 'esbuild-plugin-node-externals';
(async () => {
const res = await build({
entryPoints: ['.src/main.ts'],
bundle: true,
outfile: './dist/main.js',
plugins: [
nodeExternals({
packagePaths: 'package.json',
include: ['SOME_PKG_YOU_WANT_TO_INCLUDE_AT_BUNDLE'],
}),
],
});
})();
```
## Configurations
```typescript
export interface NodeExternalsOptions {
/**
* list of package.json paths to read from
* if not specified, will read from cwd
*/
packagePaths: string | string[];
/**
* mark all dependencies as external
* @default true
*/
withDeps: boolean;
/**
* mark all devDependencies as external
* @default true
*/
withDevDeps: boolean;
/**
* mark all peerDependencies as external
* @default true
*/
withPeerDeps: boolean;
/**
* mark all optionalDependencies as external
* @default true
*/
withOptDeps: boolean;
/**
* list of packages to exclude from externalization
*/
include: string[];
}
```
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