diff --git a/crates/base/src/worker/pool.rs b/crates/base/src/worker/pool.rs index 73fa7054d..8042a8b16 100644 --- a/crates/base/src/worker/pool.rs +++ b/crates/base/src/worker/pool.rs @@ -365,6 +365,7 @@ impl WorkerPool { maybe_jsx_import_source_config, maybe_s3_fs_config, maybe_tmp_fs_config, + static_patterns, .. } = worker_options; @@ -381,7 +382,7 @@ impl WorkerPool { maybe_module_code, maybe_entrypoint, maybe_decorator, - static_patterns: vec![], + static_patterns, maybe_jsx_import_source_config, maybe_s3_fs_config, @@ -714,7 +715,7 @@ pub async fn create_user_worker_pool( None => break, Some(UserWorkerMsgs::Create(worker_options, tx)) => { worker_pool.create_user_worker(WorkerContextInitOpts { - static_patterns: static_patterns.clone(), + static_patterns: [worker_options.static_patterns, static_patterns.clone()].concat(), maybe_jsx_import_source_config: { if worker_options.maybe_jsx_import_source_config.is_some() { worker_options.maybe_jsx_import_source_config diff --git a/deno.json b/deno.json index 184ec3860..056820a10 100644 --- a/deno.json +++ b/deno.json @@ -4,7 +4,7 @@ "./crates/base/test_cases" ], "fmt": { - "useTabs": true, + "useTabs": false, "lineWidth": 100, "indentWidth": 4, "singleQuote": true, @@ -14,4 +14,4 @@ "npm:@meowmeow/foobar": "npm:is-odd", "openai": "npm:openai" } -} \ No newline at end of file +} diff --git a/examples/main/index.ts b/examples/main/index.ts index 2f60592c1..cae08369d 100644 --- a/examples/main/index.ts +++ b/examples/main/index.ts @@ -131,6 +131,9 @@ Deno.serve(async (req: Request) => { // const cpuTimeSoftLimitMs = 10000; const cpuTimeHardLimitMs = 20000; + const staticPatterns = [ + './examples/**/*.html', + ]; return await EdgeRuntime.userWorkers.create({ servicePath, @@ -143,6 +146,7 @@ Deno.serve(async (req: Request) => { netAccessDisabled, cpuTimeSoftLimitMs, cpuTimeHardLimitMs, + staticPatterns, // maybeEszip, // maybeEntrypoint, // maybeModuleCode, diff --git a/examples/serve-html/bar.html b/examples/serve-html/bar.html new file mode 100644 index 000000000..9515f7093 --- /dev/null +++ b/examples/serve-html/bar.html @@ -0,0 +1,3 @@ + +