Skip to content

Commit 63c5dc5

Browse files
committed
fix: exodus/replay is optional
1 parent 4381ad1 commit 63c5dc5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/replay.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ let readRecordingRaw, writeRecording
66
function loadReplayBundle() {
77
// TODO: also under process.features.require_module
88
if (process.env.EXODUS_TEST_ENVIRONMENT === 'bundle') {
9-
replay = require('@exodus/replay') // synchronous
10-
} else if (!replay) {
11-
throw new Error('Failed to load @exodus/replay')
9+
try {
10+
replay = require('@exodus/replay') // synchronous
11+
} catch {}
1212
}
13+
14+
if (!replay) throw new Error('Failed to load @exodus/replay')
1315
}
1416

1517
// Optimized out in 'bundle' env

0 commit comments

Comments
 (0)