@intrnl/rollup-plugin-node-externals
v0.1.3
Published
Marks package.json dependencies as external
Downloads
9
Readme
rollup-plugin-node-externals
Mark package.json
dependencies as external
Usage
Requires a resolver like @rollup/plugin-node-resolve
to work.
npm install --save-dev @intrnl/rollup-plugin-node-externals
# pnpm install --save-dev @intrnl/rollup-plugin-node-externals
# yarn add --dev @intrnl/rollup-plugin-node-externals
// rollup.config.js
import { externals as externalsPlugin } from '@intrnl/rollup-plugin-node-externals';
import resolvePlugin from '@rollup/plugin-node-resolve';
export default {
input: 'src/index.js',
plugins: [
// Make sure you put it before the resolver plugin
externalsPlugin(),
resolvePlugin(),
],
};
Options
external?: string[]
What to mark as external, allowed values areregular
dev
optional
andpeer
, defaults to marking all exceptdev
dependenciesroot?: string
Where to start finding forpackage.json
, defaults to current working directory