Skip to content

Commit 195451d

Browse files
authored
Set preferBuiltins:true for Node
This option was enabled by default at some point in the node-resolve plugin, which should already have fixed #303 and #288. It still prints a warning though, which is illogical when we're compiling for a Node target. This silences that warning.
1 parent 6a734c4 commit 195451d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ function createConfig(options, entry, format, writeMeta) {
529529
browser: options.target !== 'node',
530530
// defaults + .jsx
531531
extensions: ['.mjs', '.js', '.jsx', '.json', '.node'],
532+
preferBuiltins: options.target === 'node' ? true : undefined
532533
}),
533534
commonjs({
534535
// use a regex to make sure to include eventual hoisted packages

0 commit comments

Comments
 (0)