Skip to content

Commit

Permalink
chore(compartment-mapper): Improve makeBundle diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Oct 29, 2024
1 parent c30c83a commit 799beff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/compartment-mapper/src/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,14 @@ const sortedModules = (
const source = compartmentSources[compartmentName][moduleSpecifier];
if (source !== undefined) {
const { record, parser, deferredError, bytes } = source;
assert(parser !== undefined);
assert(bytes !== undefined);
assert(
bytes !== undefined,
`No bytes for ${moduleSpecifier} in ${compartmentName}`,
);
assert(
parser !== undefined,
`No parser for ${moduleSpecifier} in ${compartmentName}`,
);
if (deferredError) {
throw Error(
`Cannot bundle: encountered deferredError ${deferredError}`,
Expand Down

0 comments on commit 799beff

Please sign in to comment.