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

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

Please sign in to comment.