-
-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
Description
We want to improve the following points:
- dev / build consistency
- currently code frame is only shown during dev. (this is because
resolveIderror is caught by Vite import analysis'stransformhook)
- currently code frame is only shown during dev. (this is because
- it only shows the direct importer of
xxx-onlyand that doesn't help much.
Maybe we can delay throwing errors from resolveId to later stage, perhaps buildEnd, so that we can check importer chains of xxx-only and improve error messages. (Improving the error message for build is more important than dev. Probably we cannot do much dev anyways.)
It looks like sveltekit indeed checks their "server convention" during writeBundle. https://github.com/sveltejs/kit/blob/84298477a014ec471839adf7a4448d91bc7949e4/packages/kit/src/exports/vite/index.js#L516
Oh wait, the code actually changed now to use resolveId + load instead. sveltejs/kit#14155