denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.17k stars 621 forks source link

Deno tries to import "node:process" when a module references the global "process" (in browser) #2602

Open calebegg opened 1 month ago

calebegg commented 1 month ago

Version: Deno 1.44.4

I'm trying to import @lezer/lr in a Fresh island module from esm.sh. It references 'process' here: https://github.com/lezer-parser/lr/blob/main/src/parse.ts#L9. This appears to cause deno to add an import for node:process, which fails (of course) in the browser with a CORS error.

calebegg commented 1 month ago

Just confirmed it repros with latest Deno, 1.45.2