fix node detection in logger
This commit is contained in:
parent
72c34f7e63
commit
f60831454f
@ -106,7 +106,7 @@ async function getStaticSourceMaps(): Promise<Map<string, SourceMapConsumer>> {
|
|||||||
)
|
)
|
||||||
continue; // make sure .map file exists
|
continue; // make sure .map file exists
|
||||||
const fileBuff = await fs.readFile(file + '.map');
|
const fileBuff = await fs.readFile(file + '.map');
|
||||||
if (URL && typeof Blob !== 'undefined') {
|
if (typeof window !== 'undefined') { // not running in node
|
||||||
// only run this stuff if we are running in a browser window
|
// only run this stuff if we are running in a browser window
|
||||||
const mappingsWasmBuffer = await fs.readFile(
|
const mappingsWasmBuffer = await fs.readFile(
|
||||||
path.join(__dirname, '../../node_modules/source-map/lib/mappings.wasm'),
|
path.join(__dirname, '../../node_modules/source-map/lib/mappings.wasm'),
|
||||||
|
Loading…
Reference in New Issue
Block a user