-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support PnP in order to use with Yarn 2 #8292
Comments
The Flow team has no plans to adopt support for Yarn 2 or PNP. The primary use case for Flow at Facebook is in support of React code. The React team has publicly stated that they have no immediate plans to support Yarn 2. There's a more thorough discussion here. Edit: Note that the Twitter discussion linked contains members of both the React Native and React Core teams. |
Thanks for the info, I'll keep this open since they may want to support it in the future when Yarn 2 is stable |
To be clear, React itself has no opinions about PnP or Yarn 2. If it works for people, that's great. However, the React Native repository currently doesn't run with PnP, and we currently don't have plans to support that (because making a huge repository compatible is a lot of work). |
I think that a solution is to add two options: The EXAMPLE Consider this project, in the // index.mjs
import start from "./server";
start(); // server.mjs
import * as log from "logger";
export default function () {
log.blue("Started!");
} // "logger" (stored somewhere by Yarn)
export function blue(msg) {
console.log(msg);
} This is what would happen: |
@AndrewPardoe if import maps ever get standardized, do you think Flow would want to support them? As far as I understand the import maps would be static files, so resolution code could be implemented in OCaml instead of spawning node processes to call custom loaders. And @gaearon same question about react-native, do you think react-native team would want to support import maps? If so then this would be a good argument in favor of standardizing import maps to add to that linked discussion. |
Closing for similar reason as #7014. |
Proposal
Getting rid of one of the blockers mentioned by @arcanis in here
Use case
Using Flow with Yarn 2
Related:
The text was updated successfully, but these errors were encountered: