Replies: 2 comments 1 reply
-
I considered the consistency with the type definitions and thought 2 is better. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have made a PR for solution 2: #14521. Solution 1 is still on the table, but there hasn't been a discussion for it yet. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Externalized dependencies in Vite has an inconsistency, where:
__esModule
handling)Possible solutions
1. Make prod match dev behaviour (proxy everywhere)
This means wrapping all externalized modules with the proxy. However, I find this hard to handle. For example,
There's also the risk of some modules we're unable to detect to conditionally apply the interop. Plus existing issues of
pkg.named
auto-interop strategy that breaks live binding.It's not impossible to support this, but takes a lot of work to do so.
2. Make dev match prod behaviour (no proxy)
This means no proxying at all. Dev should simply import the module. Feels like the right thing to do, and the fact that it would fail in prod anyways, maybe it doesn't be breaking much?
Feedback
I'd like feedback on:
Beta Was this translation helpful? Give feedback.
All reactions