-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix(optimizer): log esbuild error when scanning deps #11977
Conversation
f80da74
to
274bba4
Compare
I tested this locally but it seemed the message is still a bit intertwined, since it logs and errors at the same time. I went in and updated the log error 😬 It should look like this now: Let me know if this works for you. There's two new lines under esbuild frames, but I'm leaving it as-is to not mess with esbuild's formatted messages in case it changes. |
I removed that as I'm not sure if it's important. We need to have the esbuild stacktrace too so they know it's coming from esbuild. Between the two frames, I think keeping esbuild's one is enough. The user can search for "Failed to scan dependencies from entries" in Vite's code if they want to know where this error is emitted. |
LGTM, nice polishing. |
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Description
from #11966
The error message thrown from esbuild in the scanning stage now is quite opaque. This PR added essential error messages and stack traces.
log before:
log now:
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).