Joyee Cheung
Joyee Cheung
The summit has passed. closing.
A polymorphic property can be more confusing, it's better to keep the type consistent.
> Given this is CJS-only I think we should clearly call the hook cjsEvaluate or similar. The idea is that we'll have non-mutable support for ESM (e.g. for tracing perf...
> this hook only applies to CJS and ESM CJS wrappers. I am not sure why this is not clear from OP or from the comment above, I guess I...
> This would not apply to JSON, Wasm and Addons imported into ES modules though right? It would. They are actually easier to cover because they are mutable (since synthetic...
> If it allows for more than just modifying the exports but also changing the contents of the module itself, then I guess evaluate is probably the best name. It...
> What if the ultimate way source text modules are supported does not align with this hook design? Do we then need an evaluteV2 hook? I think the default evaluate...
> My honest opinion here is I don't think there is a future where this hook can work for source text modules, therefore I would prefer an API that takes...
> Since it is operating on a module.exports object which is a plain object and not a ModuleNamespace, I think moduleExportsHook might be another alternative. I don't think it will...
> perhaps let's leave the design space open for now, to avoid the future breaking change that would be needed, even though the API is experimental. I am not sure...