Skip to content

Commit

Permalink
quick bugfix for default --external handling breaking node resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jul 5, 2018
1 parent d371c6a commit 3193787
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,13 @@ function createConfig(options, entry, format, writeMeta) {
aliases['.'] = './' + basename(options.output);
}

let useNodeResolve;
let useNodeResolve = true;
const peerDeps = Object.keys(pkg.peerDependencies || {});
if (options.external === 'none') {
useNodeResolve = true;
// bundle everything (external=[])
} else if (options.external) {
useNodeResolve = true;
external = external.concat(peerDeps).concat(options.external.split(','));
} else {
useNodeResolve = false;
external = external
.concat(peerDeps)
.concat(Object.keys(pkg.dependencies || {}));
Expand Down

0 comments on commit 3193787

Please sign in to comment.