This commit is contained in:
Igor Savin
2026-03-19 00:18:43 +02:00
committed by Jay Linski
parent 60d17f546d
commit 243060b310
+6 -1
View File
@@ -8,7 +8,12 @@ try {
if (typeof define !== 'function' || !define.amd) { if (typeof define !== 'function' || !define.amd) {
// We don't support this in AMD environments. For these environments, we assume that // We don't support this in AMD environments. For these environments, we assume that
// they are running on the browser and thus have no need for the source-map library. // they are running on the browser and thus have no need for the source-map library.
let SourceMap = require('source-map'); // The variable indirection prevents bundlers from statically resolving and bundling
// source-map (which requires Node-built-ins). The stub SourceNode below handles
// browser/bundled usage. Bundlers may emit a "Critical dependency" warning — this
// is expected and harmless.
let mod = 'source-map';
let SourceMap = require(mod);
SourceNode = SourceMap.SourceNode; SourceNode = SourceMap.SourceNode;
} }
// oxlint-disable-next-line no-unused-vars -- Babel 5 requires named catch param // oxlint-disable-next-line no-unused-vars -- Babel 5 requires named catch param