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
@@ -91,7 +91,7 @@ export default {
91
91
builtins?: boolean
92
92
93
93
// node: prefix handing for importing NodeJS builtins. Default: 'add'.
94
-
builtinsPrefix?:'add'|'strip'|'ignore'
94
+
builtinsPrefix?:boolean|'add'|'strip'|'ignore'
95
95
96
96
// The path(s) to your package.json. Default: read below.
97
97
packagePath?:string|string[]
@@ -121,10 +121,10 @@ export default {
121
121
#### builtins?: boolean = true
122
122
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://www.npmjs.com/package/rollup-plugin-node-polyfills) as well.
How to handle the `node:` scheme when importing builtins (i.e., `import path from 'node:path'`).
126
-
- If `add` (the default, recommended), the `node:` scheme is always added if missing, so `path` becomes `node:path`. In effect, this dedupes your imports of Node builtins by homogenizing their names to their schemed version.
127
-
- If `strip`, the scheme is always removed, so `node:path` becomes `path`. In effect, this dedupes your imports of Node builtins by homogenizing their names to their scheme-less version. Schemed-only builtins like `node:test` or `node:sqlite` are never stripped.
126
+
- If `add`or `true`(the default, recommended), the `node:` scheme is always added if missing, so `path` becomes `node:path`. In effect, this dedupes your imports of Node builtins by homogenizing their names to their schemed version.
127
+
- If `strip` or `false`, the scheme is always removed, so `node:path` becomes `path`. In effect, this dedupes your imports of Node builtins by homogenizing their names to their scheme-less version. Schemed-only builtins like `node:test` or `node:sqlite` are never stripped.
128
128
-`ignore` will simply leave all builtins imports as written in your code. Caveat: if you write `node:path` but one of your bundled dependencies uses `path` (or the other way around), your bundle will end up with both `node:path` and `path` imports.
0 commit comments