diff --git a/build/lib/util.js b/build/lib/util.js index 899c5984ff..5eb4e48344 100644 --- a/build/lib/util.js +++ b/build/lib/util.js @@ -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); diff --git a/build/lib/util.ts b/build/lib/util.ts index 6322c09d8b..8f8ded195c 100644 --- a/build/lib/util.ts +++ b/build/lib/util.ts @@ -227,7 +227,7 @@ export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.Re .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; }));