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 #8498, add Vue filePath to error codeFrames #8499

Merged
merged 1 commit into from Oct 16, 2022

Conversation

lol768
Copy link
Contributor

@lol768 lol768 commented Sep 23, 2022

Closes #8498

↪️ Pull Request

  • Passes through the filePath into the codeFrame when reporting a compiler error. This enables the end-user to actually see which component the error came from.

It doesn't appear to show a preview of the code, so possible I'm doing something wrong there - but for my purposes it at least allows me to work out where the problems in my code lie.

🚨 Test instructions

  • Prerequisite: apply Apply @mjog's patch so that Vue SFC errors are actually displayed #8497 first, so that errors actually get reported properly
  • Deliberately cause an error in an SFC
  • Observe that Parcel's errors don't display the component path and it's therefore impossible to know which component is at fault
  • Apply the patch, observe that paths are reported afterwards

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@lol768
Copy link
Contributor Author

lol768 commented Oct 14, 2022

Rebased

@mischnic
Copy link
Member

You'll need to update the branch again.

@lol768
Copy link
Contributor Author

lol768 commented Oct 15, 2022

You'll need to update the branch again.

sure

@mischnic mischnic merged commit cf7e899 into parcel-bundler:v2 Oct 16, 2022
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.

VueTransformer does not pass filePath in to codeFrame diagnostics objects
2 participants