@intrnl/rollup-plugin-node-externals
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

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 are regular dev optional and peer, defaults to marking all except dev dependencies
  • root?: string
    Where to start finding for package.json, defaults to current working directory

Readme

Keywords

none

Package Sidebar

Install

npm i @intrnl/rollup-plugin-node-externals

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

6.32 kB

Total Files

5

Last publish

Collaborators

  • intrnl