Switch to ESM (#2138)
This commit is contained in:
+5
-4
@@ -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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user