gltfjsx icon indicating copy to clipboard operation
gltfjsx copied to clipboard

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

Open jo-chemla opened this issue 2 months ago • 0 comments

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.

jo-chemla avatar Apr 24 '24 10:04 jo-chemla