Merge pull request #603 from developit/preferbuiltins-fix

This commit is contained in:
Marvin Hagemeister 2020-05-06 23:39:18 +02:00 committed by GitHub
commit 55218818dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -537,7 +537,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,
preferBuiltins: options.target === 'node',
}),
commonjs({
// use a regex to make sure to include eventual hoisted packages