Skip to content

Commit 2b15198

Browse files
author
Stephan Septh Schreiber
committed
Small README changes. Correctly use 'dist' script before releasing.
1 parent 851ea2d commit 2b15198

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ By default, Rollup doesn't know a thing about NodeJS, so using simple things lik
88

99
However, this must be done for each and every NodeJS built-in modules: `path`, `os`, `fs`, etc., which can quicky become cumbersome when done manually. So the primary goal of this plugin is simply to automatically declare all NodeJS built-in modules as `external`.
1010

11-
This plugin will also allow you, should you need it, to declare your dependencies (as defined in your `package.json` file) as `external`.
11+
This plugin will also allow you, should you need it, to declare your dependencies (as declared in your `package.json` file) as `external` so they are not bundled in but will be required or imported at runtime.
1212

1313

1414
## Install
@@ -23,19 +23,21 @@ npm install --save-dev rollup-plugin-node-externals
2323
```js
2424
import externals from 'rollup-plugin-node-externals'
2525

26+
const packagePath = 'path/to/package.json' // Optional, useful in monorepos
27+
2628
export default {
2729
// ...
2830
plugins: [
2931
externals({
30-
packagePath: myPath // The path to your package.json (default: process.cwd())
31-
builtins: true, // make node builtins external (default: true)
32-
deps: true, // make pkg.dependencies external (default: false)
33-
devDeps: true, // make pkg.devDependencies external (default: true)
34-
peerDeps: true, // make pkg.peerDependencies external (default: true)
35-
optDeps: true, // make pkg.optionalDependencies external (default: true)
36-
exclude: [], // deps to exclude from externals (default: [])
37-
include: [], // deps to include in externals (default: [])
38-
except: [] // deprecated -- see below
32+
packagePath, // The path to your package.json (default: process.cwd() which is usally the same dir where rollup.config.js stands)
33+
builtins: true, // make node builtins external (default: true)
34+
deps: true, // make pkg.dependencies external (default: false)
35+
devDeps: true, // make pkg.devDependencies external (default: true)
36+
peerDeps: true, // make pkg.peerDependencies external (default: true)
37+
optDeps: true, // make pkg.optionalDependencies external (default: true)
38+
exclude: [], // deps to exclude from externals (default: [])
39+
include: [], // deps to include in externals (default: [])
40+
except: [] // deprecated -- see below
3941
})
4042
]
4143
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rollup-plugin-node-externals",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "Automatically declare NodeJS built-in modules and npm dependencies as 'external' in Rollup config",
55
"author": "Stephan Schreiber <[email protected]>",
66
"license": "MIT",

0 commit comments

Comments
 (0)