mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 10:58:31 -05:00
Fix 'failed to load source map' warnings in console (#20455)
* disable * Skip embedded sourcemaps * comment
This commit is contained in:
@@ -173,7 +173,7 @@ function rewriteSourceMappingURL(sourceMappingURLBase) {
|
||||
.pipe(es.mapSync(f => {
|
||||
const contents = f.contents.toString('utf8');
|
||||
const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`;
|
||||
f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str));
|
||||
f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=((?!data:).*)$/gm, str)); // {{SQL CARBON EDIT}} Don't rewrite embedded source maps - some of our dependencies have these (sanitize-html)
|
||||
return f;
|
||||
}));
|
||||
return es.duplex(input, output);
|
||||
|
||||
@@ -227,7 +227,7 @@ export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.Re
|
||||
.pipe(es.mapSync<VinylFile, VinylFile>(f => {
|
||||
const contents = (<Buffer>f.contents).toString('utf8');
|
||||
const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`;
|
||||
f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str));
|
||||
f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=((?!data:).*)$/gm, str)); // {{SQL CARBON EDIT}} Don't rewrite embedded source maps - some of our dependencies have these (sanitize-html)
|
||||
return f;
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user