Skip to content

Commit

Permalink
Merged in wbinnssmith/add-back-packaging-invariant (pull request #1)
Browse files Browse the repository at this point in the history
Restore invariant asserting bundles don't have external assets

Approved-by: Trey Shugart <tshugart@atlassian.com>
  • Loading branch information
Will Binns-Smith authored and cla-test-user committed Sep 23, 2019
1 parent 642f64f commit d6cebc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/packagers/js/src/JSPackager.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export default new Packager({
) {
// if this is a reference to another javascript asset, we should not include
// its output, as its contents should already be loaded.
// invariant(
// !bundle.hasAsset(resolved),
// `Expected JS bundle ${
// bundle.name
// } to only contain JS, but contained ${resolved.filePath}`
// );
invariant(
!bundle.hasAsset(resolved),
`Expected JS bundle ${
bundle.name
} to only contain JS, but contained ${resolved.filePath}`
);
wrapped += JSON.stringify(resolved.id) + ':[function() {},{}]';
} else {
return;
Expand Down

0 comments on commit d6cebc2

Please sign in to comment.