From 3288f8b8c6ca6ccf3faa650bb5f9d02b34270ce5 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Wed, 2 Aug 2023 10:28:20 +1000 Subject: [PATCH] fix: allow loading modules from any local path --- crates/sb_workers/user_workers.js | 2 +- examples/main/index.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/sb_workers/user_workers.js b/crates/sb_workers/user_workers.js index 9edebd24..1dd41fb2 100644 --- a/crates/sb_workers/user_workers.js +++ b/crates/sb_workers/user_workers.js @@ -71,7 +71,7 @@ class UserWorker { envVars: [], forceCreate: false, netAccessDisabled: false, - customModuleRoot: null, + customModuleRoot: '', ...opts, }; diff --git a/examples/main/index.ts b/examples/main/index.ts index b1f9658e..da9466e0 100644 --- a/examples/main/index.ts +++ b/examples/main/index.ts @@ -32,7 +32,6 @@ serve(async (req: Request) => { const memoryLimitMb = 150; const workerTimeoutMs = 5 * 60 * 1000; const noModuleCache = false; - const customModuleRoot = null; // you can provide an import map inline // const inlineImportMap = { // imports: { @@ -55,7 +54,6 @@ serve(async (req: Request) => { importMapPath, envVars, forceCreate, - customModuleRoot, netAccessDisabled, }); };