Skip to content

Commit

Permalink
Merge pull request #7 from dbilgili/multiple-entry-point-fix
Browse files Browse the repository at this point in the history
Fix for undefined bundle name with multiple entry points
  • Loading branch information
albinotonnina authored Sep 2, 2020
2 parents 95d7a81 + 1191775 commit f428424
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ ${footer}`

const processAsset = async (bundle, processFn) => {
const {name} = bundle
const wrappingCode = await processFn({name, bundler})

if (wrappingCode) {
writeAsset(name, wrappingCode)
if (name !== undefined) {
const wrappingCode = await processFn({name, bundler})

if (wrappingCode) {
writeAsset(name, wrappingCode)
}
}

bundle.childBundles.forEach(function(bundle) {
bundle.childBundles.forEach((bundle) => {
processAsset(bundle, processFn)
})
}
Expand Down

0 comments on commit f428424

Please sign in to comment.