Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
fix: cache busting should not be used if the target is a server (#1394)
Browse files Browse the repository at this point in the history
fixes #1393
  • Loading branch information
Josh Pike authored and nchanged committed Sep 24, 2018
1 parent 26018e9 commit ae6595f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/BundleSource.ts
Expand Up @@ -267,8 +267,14 @@ ${file.headerContent ? file.headerContent.join("\n") : ""}`,
}
if (this.context.sourceMapsProject || this.context.sourceMapsVendor) {
let sourceName = /[^\/]*$/.exec(this.context.output.filename)[0];

if(this.context.target === "server"){
// cache busting should not be used if the target is a server, as it will interfere with local filesystem resolution
this.concat.add(null, `//# sourceMappingURL=${sourceName}.js.map`);
} else {
this.concat.add(null, `//# sourceMappingURL=${sourceName}.js.map?tm=${this.context.cacheBustPreffix}`);
}

this.concat.add(null, `//# sourceMappingURL=${sourceName}.js.map?tm=${this.context.cacheBustPreffix}`);
}
}

Expand Down

0 comments on commit ae6595f

Please sign in to comment.