Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
esbuild-plugin-node-externals
Advanced tools
ESBuild plugin for node externals handing.
npm install esbuild-plugin-node-externals --save-dev
pnpm install esbuild-plugin-node-externals --save-dev
yarn add esbuild-plugin-node-externals --save-dev
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'],
}),
],
});
})();
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[];
}
FAQs
ESBuild plugin for node externals.
We found that esbuild-plugin-node-externals demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.