Skip to content

Commit

Permalink
Prevent overzealous bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma4345 committed Dec 9, 2024
1 parent 3fbd3b5 commit d269f53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function createHost(arangojsHostUrl: string, agentOptions?: any): Host {
createDispatcher = (async () => {
let undici: any;
try {
undici = await import("undici");
// Prevent overzealous bundlers from attempting to bundle undici
const undiciName = "undici";
undici = await import(undiciName);
} catch (cause) {
if (socketPath) {
throw new Error('Undici is required for Unix domain sockets', { cause });
Expand Down

0 comments on commit d269f53

Please sign in to comment.