Switch to ESM (#2138)

This commit is contained in:
Igor Savin
2026-04-21 22:02:44 +03:00
committed by GitHub
parent b10cec2322
commit 0e1d35582a
85 changed files with 464 additions and 7378 deletions
+5 -4
View File
@@ -1,8 +1,9 @@
import { createRequire } from 'module';
var SourceMap, SourceMapConsumer;
try {
if (typeof define !== 'function' || !define.amd) {
var SourceMap = require('source-map'),
SourceMapConsumer = SourceMap.SourceMapConsumer;
}
SourceMap = createRequire(import.meta.url)('source-map');
SourceMapConsumer = SourceMap.SourceMapConsumer;
} catch {
/* NOP for in browser */
}