Skip to content

Commit

Permalink
fix subapp-web matchEntry for webpack5
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Mar 29, 2021
1 parent 40b24d3 commit 2138894
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/subapp-web/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ const utils = {
// <entryName>.~<hash>.bundle[.dev].js
// See xarc-webpack/lib/partial/subapp-chunks.js
//
const matchEntry = x => x.startsWith(`${entryName}.bundle`) || x.startsWith(`${entryName}.~`);
const matchEntry = x =>
x &&
(x.startsWith(`${entryName}.bundle`) ||
// if a subapp comes from a package in node_modules, webpack5 names entry like this
x.startsWith(`${entryName}~_.bundle`) ||
x.startsWith(`${entryName}.~`));
// map all IDs to actual assets
const bundleAssets = entryPoints
.map(id => {
Expand Down

0 comments on commit 2138894

Please sign in to comment.