You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,17 @@ A Rollup plugin that automatically declares NodeJS built-in modules as `external
3
3
4
4
Works in monorepos too!
5
5
6
-
> ## Breaking changes in version 5
7
-
> - In previous versions, the `devDeps` option (see below) defaulted to `true`.<br>This was practical, but often wrong: devDependencies are ment just for that: being used when developping. Therefore, the `devDeps` option now defaults to `false`, meaning Rollup will include them in your bundle.
6
+
> ###Breaking changes in version 5
7
+
> - In previous versions, the `devDeps` option (see below) defaulted to `true`.<br>This was practical, but often wrong: devDependencies are meant just for that: being used when developping. Therefore, the `devDeps` option now defaults to `false`, meaning Rollup will include them in your bundle.
8
8
>- As anticipated since v4, the `builtinsPrefix` option now defaults to `'add'`.
9
9
>- The deprecated `prefixedBuiltins` option has been removed.
10
-
> -`rollup-plugin-node-externals` no longer depends on the Find Up package. While this is not a breaking change per se, it can be in some edge situations.
10
+
> -`rollup-plugin-node-externals` no longer depends on the Find-Up package (while this is not a breaking change per se, it can be in some edge situations).
11
+
> - Now has a _peer dependency_ on `rollup ^2.60.0 || ^3.0.0`.
12
+
13
+
> ### Breaking changes in version 4
14
+
> - In previous versions, the `deps` option (see below) defaulted to `false`.<br>This was practical, but often wrong: when bundling for distribution, you want your own dependencies to be installed by the package manager alongside your package, so they should not be bundled in the code. Therefore, the `deps` option now defaults to `true`.
15
+
> - Now requires Node 14 (up from Node 12 for previous versions).
16
+
> - Now has a _peer dependency_ on `rollup ^2.60.0`.
11
17
12
18
## Why you need this
13
19
<details><summary>(click to expand)</summary>
@@ -101,9 +107,9 @@ Set the `builtins` option to `false` if you'd like to use some shims/polyfills f
101
107
102
108
#### builtinsPrefix?: 'add' | 'strip' = 'add'
103
109
How to handle the `node:` scheme used in recent versions of Node (i.e., `import path from 'node:path'`).<br>
104
-
_Note that prefix handling is independant of the `builtins` options being enabled or disabled._
105
110
- If `add` (the default), the `node:` prefix is always added. In effect, this homogenizes all your imports of node builtins to their prefixed version.
106
111
- If `strip` (the default), the import is always resolved unprefixed. In effect, this homogenizes all your imports of node builtins to their unprefixed version.
112
+
> _Note that prefix handling is independant of the `builtins` options being enabled or disabled._
107
113
108
114
#### packagePath?: string | string[] = []
109
115
If you're working with monorepos, the `packagePath` option is made for you. It can take a path, or an array of paths, to your package.json file(s). If not specified, the default is to start with the current directory's package.json then go up scan for all package.json files in parent directories recursively until either the root git directory is reached or until no other package.json can be found.
0 commit comments