Skip to content

Commit

Permalink
Fix outputting dynamic bundles, fixes #472 (#474)
Browse files Browse the repository at this point in the history
When #443 was merged, it moved the list of dynamic bundle names to a
metadata property on the `scripts:bundle` node. However, the `bankai
build` command was never updated to match.
  • Loading branch information
goto-bus-stop authored May 2, 2018
1 parent 8daa49b commit 2817d0f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/cmd-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function build (entry, outdir, opts) {
var stepName = nodeName + ':' + edgeName
if (stepName === 'assets:list') writeAssets('assets')
if (stepName === 'documents:list') writeDocuments('documents')
if (stepName === 'scripts:list') writeScripts('scripts')
if (stepName === 'scripts:bundle') writeScripts('scripts')
if (stepName === 'service-worker:bundle') {
var filename = compiler.graph.metadata.serviceWorker
compiler.serviceWorker(writeSimple(filename, 'service-worker'))
Expand Down Expand Up @@ -103,9 +103,8 @@ function build (entry, outdir, opts) {
}

function writeScripts (step) {
var node = compiler.graph.data[step].list
var list = String(node.buffer)
list = list.length ? list.split(',') : []
var node = compiler.graph.data[step].bundle
var list = node.dynamicBundles || []
async.mapLimit(list, 3, iterator, function (err) {
if (err) return log.error(err)
completed(step)
Expand Down

0 comments on commit 2817d0f

Please sign in to comment.