-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
refactor(node_resolver): make conditions_from_resolution_mode configurable #27596
base: main
Are you sure you want to change the base?
refactor(node_resolver): make conditions_from_resolution_mode configurable #27596
Conversation
Note change is breaking |
…no more memory issues
@@ -63,6 +66,30 @@ fn conditions_from_resolution_mode( | |||
} | |||
} | |||
|
|||
pub struct ConditionsFromResolutionMode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just be: pub struct ConditionsFromResolutionMode(Option<Box<dyn Fn(ResolutionMode) -> &'static [&'static str]>>)
with a default implementation of ConditionsFromResolutionMode(None)
that will instead use deno_conditions_from_resolution_mode
? That way the other code can just do ConditionsFromResolutionMode::default()
instead of needing to know about deno_conditions_from_resolution_mode
A user was trying to use Hono node server + react-dom, because node server expects
renderToPipeableStream
, because thedeno
export maps to browser, it doesn't have that export, instead it hasrenderToReadableStream
. I want to be able to configurably choose module priority based on if users are more leaning into deno or node.