-
Notifications
You must be signed in to change notification settings - Fork 201
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
error - SyntaxError: Unexpected token '<' #180
Comments
Thanks for opening this issue. Can you please provide a reproduction repo with instructions how to reproduce the problem you're experiencing? Thank you! |
Please refer to the reproduced repo: REPO Getting Started guide from https://www.contentlayer.dev/docs/getting-started was referenced to reproduce the problem.
|
Thanks for the repro and apologies for the inconvenience. Looks like you're missing the From docs: Note: I'm also planning to display a warning for situations like these in the future #183 |
Just wanna drop a line that this was super helpful! I was following a project that used an older version of contentlayer and was confused about how setting |
The .mdx.json file generated includes
"body": { "raw": " ", "html": " "}
.The expected object to be generated is
"body": { "raw": " ", "code": " "}
, according to the example.contentlayer.config.ts
Passing the generated .mdx.json file to
useMDXComponent(source.body.html)
spits out the following error:The text was updated successfully, but these errors were encountered: