Open gtamas opened 1 year ago
yarn's .pnp.cjs
and .pnp.loader.mjs
use node's internal behavior, which is not implemented yet in bun. Looks like we should make a plugin for bun or suggest to yarn to support bun environment...
Related: #3852, #3546
Second this. It's hard to go back after plug and play and having the entire system being reproducible. Cloning a project or switching branches doesn't need to fetch any dependencies. Keep in mind there are two things that helps with that, compressing them and allowing for a arch matrix for native modules.
Note that PnP actually has a formal spec, not tied to a specific implementation (ie you don't actually need to evaluate the .pnp.cjs
file). For instance, I implemented it in Rust here: https://github.com/arcanis/pnp-rust. It's relatively easy!
Any update?
Related #13632
What is the problem this feature would solve?
Apps using Yarn's zero install cannot be started with bun, because it cannot find modules.
bun run ./build/src/main.js
Cannot find module "..." from
...`What is the feature you are proposing to solve the problem?
Apps using Yarn Plug n Play zero install would work with bun
What alternatives have you considered?
None