Summary
When the root deno.json uses a glob pattern (e.g. "./src/*") in the workspace array, Fresh's build process fails with WorkspaceDiscoverError(ResolveMember(NotFound)). The glob is not expanded and is instead treated as a literal path (/src/*/), causing the error.
This originates from the deno-loader and deno-resolver esbuild plugins used by Fresh — not from Deno core. Deno's own workspace resolution (deno_config crate) handles globs correctly via collect_member_config_folders in workspace/discovery.rs, but the esbuild plugins appear to use a version of deno_config that predates glob support, or a code path that doesn't invoke glob expansion.
Reproduction
From denoland/deno#28906:
- Use a workspace config with globs:
- Run a Fresh app via
createHandler from the workspace root
- Build fails with:
✘ [ERROR] WorkspaceDiscoverError(ResolveMember(NotFound { dir_url: ... /src/*/ })) [plugin deno-loader]
✘ [ERROR] WorkspaceDiscoverError(ResolveMember(NotFound { dir_url: ... /src/*/ })) [plugin deno-resolver]
Workaround: list workspace members explicitly instead of using globs.
Minimal repro repo: https://github.com/StaytunedLLP/open_poc/blob/main/src/deno_workspace_fresh/
Expected behavior
The esbuild plugins should expand workspace glob patterns the same way Deno core does, or use a deno_config version that supports them.
Summary
When the root
deno.jsonuses a glob pattern (e.g."./src/*") in theworkspacearray, Fresh's build process fails withWorkspaceDiscoverError(ResolveMember(NotFound)). The glob is not expanded and is instead treated as a literal path (/src/*/), causing the error.This originates from the
deno-loaderanddeno-resolveresbuild plugins used by Fresh — not from Deno core. Deno's own workspace resolution (deno_configcrate) handles globs correctly viacollect_member_config_foldersinworkspace/discovery.rs, but the esbuild plugins appear to use a version ofdeno_configthat predates glob support, or a code path that doesn't invoke glob expansion.Reproduction
From denoland/deno#28906:
{ "workspace": ["./src/*"] }createHandlerfrom the workspace rootWorkaround: list workspace members explicitly instead of using globs.
Minimal repro repo: https://github.com/StaytunedLLP/open_poc/blob/main/src/deno_workspace_fresh/
Expected behavior
The esbuild plugins should expand workspace glob patterns the same way Deno core does, or use a
deno_configversion that supports them.