Skip to content

Commit d269f53

Browse files
committed
Prevent overzealous bundling
1 parent 3fbd3b5 commit d269f53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/connection.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ function createHost(arangojsHostUrl: string, agentOptions?: any): Host {
7171
createDispatcher = (async () => {
7272
let undici: any;
7373
try {
74-
undici = await import("undici");
74+
// Prevent overzealous bundlers from attempting to bundle undici
75+
const undiciName = "undici";
76+
undici = await import(undiciName);
7577
} catch (cause) {
7678
if (socketPath) {
7779
throw new Error('Undici is required for Unix domain sockets', { cause });

0 commit comments

Comments
 (0)