Skip to content
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(cli/hmr): print compile error with exception details #27597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nestarz
Copy link

@nestarz nestarz commented Jan 9, 2025

fix #27577

It can be improved by adding file and line of the error, as it only displays the error information using get_message_and_description, example:

HMR Failed to reload module file:///file.ts: compile error: Uncaught SyntaxError: Cannot use import statement outside a module - undefined.

@CLAassistant
Copy link

CLAassistant commented Jan 9, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this looks good! Would you be able to add a test in this file just to confirm it actually works and so it doesn't regress in the future?

.arg("--watch-hmr")
(maybe it will be hard to write a test though... i'm not sure)

@dsherret dsherret changed the title feat(cli/hmr): print compile error with exception details fix(cli/hmr): print compile error with exception details Jan 9, 2025
@dsherret
Copy link
Member

dsherret commented Jan 9, 2025

Categorizing as a fix so that it can land in a patch release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Enhance HMR compile error messages with detailed debugging information
3 participants