With jiti v2.0.0 we have introduced native ESM import support which added a new kind of mixed export handling syntax. Early testing showed jiti v2 is broken with packages like mime without interop in mixed cases so in v2.1.0 we have enabled interopDefault by default to support out of the box.
Issues like #317 indicate that dependencies like zod will now be broken (because zod's default export is not expandable)
This PR introduces a new method for interopDefault using a Proxy which at least covers all of our current test fixtures and can be used to cover more of similar cases if reported in the future on proxy layer instead of modify default exports.
Resolves #317
With jiti v2.0.0 we have introduced native ESM import support which added a new kind of mixed export handling syntax. Early testing showed jiti v2 is broken with packages like
mime
withoutinterop
in mixed cases so in v2.1.0 we have enabledinteropDefault
by default to support out of the box.Issues like #317 indicate that dependencies like
zod
will now be broken (because zod's default export is not expandable)This PR introduces a new method for interopDefault using a Proxy which at least covers all of our current test fixtures and can be used to cover more of similar cases if reported in the future on proxy layer instead of modify default exports.