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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@
9
9
</p>
10
10
11
11
# rollup-plugin-node-externals
12
-
A Rollup/Vite plugin that automatically declares NodeJS built-in modules as `external`. Also handles npm dependencies, devDependencies, peerDependencies and optionalDependencies.
12
+
A Rollup/Vite plugin that automatically declares NodeJS built-in modules as `external`. Also handles dependencies, devDependencies, peerDependencies and optionalDependencies.
13
13
14
-
Works in pnpm/yarn/lerna monorepos too!
14
+
Works in monorepos too!
15
15
16
16
17
17
## Why you need this
@@ -34,7 +34,7 @@ As an added bonus, this plugin will also declare your dependencies (as per your
34
34
35
35
36
36
## Installation
37
-
Use your favorite package manager. Mine is [npm](https://www.npmjs.com).
37
+
Use your favorite package manager. Mine is [npm](https://www.npmjs.com):
Set the `builtins` option to `false` if you'd like to use some shims/polyfills for those. You'll most certainly need [an other plugin](https://github.com/ionic-team/rollup-plugin-node-polyfills) as well.
How to handle the `node:` scheme used in recent versions of Node (i.e., `import path from 'node:path'`).
125
+
How to handle the `node:` scheme when importing builtins (i.e., `import path from 'node:path'`).
126
126
- If `add` (the default, recommended), the `node:` scheme is always added if missing. In effect, this dedupes your imports of Node builtins by homogenizing their names to their schemed version.
127
127
- If `strip`, the scheme is always removed. In effect, this dedupes your imports of Node builtins by homogenizing their names to their scheme-less version. Schemed-only builtins like `node:test` are never stripped.
128
128
-`ignore` will simply leave all builtins imports as written in your code.
0 commit comments