Open sachaw opened 3 weeks ago
The issue is likely caused by rsbuild
not understanding Deno-specific resolution.
Is this not a deno responsibility (nodejs compat) or is this out of scope for some reason?
Every bundler has their own resolution code and rspack/rsbuild
always expects a dependency to be in the node_modules
folder as it assumes that every dependency is an npm dependency. That assumption is not something we can fix on the Deno side.
Version: Deno 2.0.0
Hi, Take the following RsBuild + SolidJS repo running under Deno:
https://github.com/sachaw/rsbuild-issue
When running
deno install
, as"nodeModulesDir": "auto"
is set, it is populated as follows:As can be seen modules like
date-fns
are populated at the root level, and hence are located and compile fine under RsBuild.Now take my next dependency:
@dewars/protobufs
which is published to JSR:It is resolved by my IDE (because of the Deno plugin), but is not populated in my
node_modules
folder, leading RsBuild to fail to resolve it.Ideally I can eventually ditch the whole
node modules
folder, so I'm hoping the solution isn't to copy all of my native deno deps undernode_modules