diff --git a/src/index.js b/src/index.js index 9accf48f..b3a97747 100644 --- a/src/index.js +++ b/src/index.js @@ -529,6 +529,7 @@ function createConfig(options, entry, format, writeMeta) { browser: options.target !== 'node', // defaults + .jsx extensions: ['.mjs', '.js', '.jsx', '.json', '.node'], + preferBuiltins: options.target === 'node' ? true : undefined, }), commonjs({ // use a regex to make sure to include eventual hoisted packages