diff --git a/src/index.js b/src/index.js index 9accf48f..6814aa60 100644 --- a/src/index.js +++ b/src/index.js @@ -393,6 +393,8 @@ function createConfig(options, entry, format, writeMeta) { const peerDeps = Object.keys(pkg.peerDependencies || {}); if (options.external === 'none') { // bundle everything (external=[]) + } else if (options.external === 'natives') { + external = external.concat(require('module').builtinModules); } else if (options.external) { external = external.concat(peerDeps).concat(options.external.split(',')); } else {