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

Add parseRaw to output parsed component tree jsx string without passing though prettier #256

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

Conversation

jo-chemla
Copy link

I stumbled upon the below error setting up a React project with Vite and trying to use the gltfjsx parser standalone.

npm create vite@latest my-app --template react

The error raised is the following: Cannot read properties of undefined (reading 'languages') and it occurs during the return of the parse function at return prettier.format(output, {...

image

This PR aims as a workaround to add another exported parser function, parseRaw which outputs the raw string. The original parse function gets output from parseRaw and return the prettier result on top of it as before.

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.

1 participant