mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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 => {
|
.pipe(es.mapSync(f => {
|
||||||
const contents = f.contents.toString('utf8');
|
const contents = f.contents.toString('utf8');
|
||||||
const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`;
|
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 f;
|
||||||
}));
|
}));
|
||||||
return es.duplex(input, output);
|
return es.duplex(input, output);
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.Re
|
|||||||
.pipe(es.mapSync<VinylFile, VinylFile>(f => {
|
.pipe(es.mapSync<VinylFile, VinylFile>(f => {
|
||||||
const contents = (<Buffer>f.contents).toString('utf8');
|
const contents = (<Buffer>f.contents).toString('utf8');
|
||||||
const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`;
|
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 f;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user