Skip to content

Commit

Permalink
Merge bundle info with the correct public url.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsm committed Nov 13, 2015
1 parent 012e31e commit 5604600
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions lib/web/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,22 @@ Asset.prototype = {
this.jspmInfo.dependencies = _deps
}

if (jspmInfo.bundles) {
debug('merge bundles in config.js')
var bundles = jspmInfo.bundles
if (bundles) {
debug('merge bundles to config.js:')
var publicURL = jspmInfo.publicURL[0]
if (publicURL) {
Object.keys(bundles).forEach(function(name) {
debug(publicURL, name)
var b = bundles[name]
delete bundles[name]
name = path.join(publicURL, name)
bundles[name] = b
})
}
debug(bundles)
writeConfigSync(this.getPublicPath(), {
bundles: jspmInfo.bundles
bundles: bundles
})
}

Expand Down

0 comments on commit 5604600

Please sign in to comment.