Skip to content

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

Open
jo-chemla wants to merge 1 commit intopmndrs:masterfrom
jo-chemla:parse-raw-PR
Open

Add parseRaw to output parsed component tree jsx string without passing though prettier#256
jo-chemla wants to merge 1 commit intopmndrs:masterfrom
jo-chemla:parse-raw-PR

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