From 283eefa946d3cef14827181a9f69052f19793a69 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 4 Jan 2016 17:40:23 -0500 Subject: [PATCH] windows fix? --- src/Bundle.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle.js b/src/Bundle.js index 02fed68..a652d90 100644 --- a/src/Bundle.js +++ b/src/Bundle.js @@ -59,7 +59,7 @@ export default class Bundle { this.assumedGlobals = blank(); - this.external = options.external || []; + this.external = ensureArray( options.external ).map( id => id.replace( /[\/\\]/g, '/' ) ); this.onwarn = options.onwarn || makeOnwarn(); // TODO strictly speaking, this only applies with non-ES6, non-default-only bundles @@ -172,8 +172,8 @@ export default class Bundle { const promises = module.dependencies.map( source => { return Promise.resolve( this.resolveId( source, module.id ) ) .then( resolvedId => { - // If the `resolvedId` is supposed to be exteral, make it so. - const forcedExternal = ~this.external.indexOf( resolvedId ); + // If the `resolvedId` is supposed to be external, make it so. + const forcedExternal = ~this.external.indexOf( resolvedId.replace( /[\/\\]/g, '/' ) ); if ( !resolvedId || forcedExternal ) { if ( !forcedExternal ) {