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 11d8311
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/core/core/src/PackagerRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,12 @@ export default class PackagerRunner {
};

let mapKey = cacheKeys.map;
if (await this.options.cache.blobExists(mapKey)) {
if (
(typeof bundle.target.sourceMap === 'object'
? !bundle.target.sourceMap.inline
: bundle.target.sourceMap) &&
(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 11d8311

Please sign in to comment.