Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Apr 24, 2020
1 parent d5a9df2 commit 9e98b14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/core/core/src/PackagerRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,14 @@ export default class PackagerRunner {
};

let mapKey = cacheKeys.map;
if (await this.options.cache.blobExists(mapKey)) {
if (
(bundle.target.sourceMap
? typeof bundle.target.sourceMap === 'object'
? !bundle.target.sourceMap.inline
: bundle.target.sourceMap
: true) &&
(await this.options.cache.blobExists(mapKey))
) {
let mapStream = this.options.cache.getStream(mapKey);
await writeFileStream(
outputFS,
Expand Down
2 changes: 1 addition & 1 deletion packages/packagers/js/src/JSPackager.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default new Packager({
queue.add(async () => {
let [code, mapBuffer] = await Promise.all([
node.value.getCode(),
node.value.getMapBuffer(),
bundle.target.sourceMap && node.value.getMapBuffer(),
]);
return {code, mapBuffer};
});
Expand Down

0 comments on commit 9e98b14

Please sign in to comment.