rollup-plugin-node-externals
- Version 8.1.2
- Published
- 22 kB
- No dependencies
- MIT license
Install
npm i rollup-plugin-node-externalsyarn add rollup-plugin-node-externalspnpm add rollup-plugin-node-externalsOverview
Automatically declare NodeJS built-in modules and npm dependencies as 'external' in Rollup/Vite config
Index
Functions
function nodeExternals
nodeExternals: (options?: ExternalsOptions) => Plugin;A Rollup/Vite plugin that automatically declares NodeJS built-in modules, and optionally npm dependencies, as 'external'.
Interfaces
interface ExternalsOptions
interface ExternalsOptions {}property builtins
builtins?: boolean;Mark node built-in modules like
path,fs... as external.Defaults to
true.
property builtinsPrefix
builtinsPrefix?: 'add' | 'strip' | 'ignore';node: prefix handing for importing Node builtins: -
'add'turns'path'to'node:path'-'strip'turns'node:path'to'path'-'ignore'leaves Node builtin names as-isDefaults to
add.
property deps
deps?: boolean;Mark dependencies as external.
Defaults to
true.
property devDeps
devDeps?: boolean;Mark devDependencies as external.
Defaults to
false.
property exclude
exclude?: MaybeArray<MaybeFalsy<string | RegExp>>;Force exclude these deps from the list of externals, regardless of other settings.
Defaults to
[](force exclude nothing).
property include
include?: MaybeArray<MaybeFalsy<string | RegExp>>;Force include these deps in the list of externals, regardless of other settings.
Defaults to
[](force include nothing).
property optDeps
optDeps?: boolean;Mark optionalDependencies as external.
Defaults to
true.
property packagePath
packagePath?: string | string[];Path/to/your/package.json file (or array of paths).
Defaults to all package.json files found in parent directories recursively. Won't go outside of a git repository.
property peerDeps
peerDeps?: boolean;Mark peerDependencies as external.
Defaults to
true.
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (13)
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rollup-plugin-node-externals.
- Markdown[](https://www.jsdocs.io/package/rollup-plugin-node-externals)
- HTML<a href="https://www.jsdocs.io/package/rollup-plugin-node-externals"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2389 ms. - Missing or incorrect documentation? Open an issue for this package.
