gltfjsx
gltfjsx copied to clipboard
Add parseRaw to output parsed component tree jsx string without passing though prettier
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, {...
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.