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

Pass file name to Babel transform for better errors #1126

Merged
merged 1 commit into from Jul 16, 2020

Conversation

silvenon
Copy link
Contributor

@silvenon silvenon commented Jul 1, 2020

Before:

SyntaxError: unknown: Expected corresponding JSX closing tag for <br> (12:164)

After:

SyntaxError: /Users/me/my-project/docs/index.mdx: Expected corresponding JSX closing tag for <br> (12:164)

https://babeljs.io/docs/en/options#filename

@vercel
Copy link

vercel bot commented Jul 1, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mdx/mdx/91cjnapgg
✅ Preview: https://mdx-git-babel-error-add-filename.mdx.vercel.app

@silvenon
Copy link
Contributor Author

silvenon commented Jul 1, 2020

Actually, hold on, I'll add a test.

@silvenon silvenon marked this pull request as draft July 1, 2020 15:40
@vercel vercel bot temporarily deployed to Preview July 1, 2020 15:52 Inactive
@silvenon silvenon marked this pull request as ready for review July 1, 2020 15:53
@silvenon silvenon requested a review from johno July 1, 2020 15:53
@silvenon
Copy link
Contributor Author

silvenon commented Jul 1, 2020

Done! I'm not sure what the CI error is about 😕 is it related?

@johno
Copy link
Member

johno commented Jul 16, 2020

Awesome, thank you @silvenon! The CI failure is unrelated.

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

Successfully merging this pull request may close these issues.

None yet

2 participants