Closed ericdmoore closed 2 years ago
Looks like an swc parsing error. Will open the upstream issue later.
To be clear, fragments generally work. It just appears that swc doesn't parse <!doctype html>
without panicking.
Yeah, this shouldn't panic, but <!doctype html>
is not valid JSX from my understanding (ex. tsc does not parse this) and a JSX fragment looks like:
JSXFragment :
< > JSXChildren < / >
https://facebook.github.io/jsx/
@ericdmoore I think you can just remove < !doctype html >
(see https://doc.deno.land/https://deno.land/x/sift@0.4.3/mod.ts/~/jsx)
Yes, I wanted to double check as I was on my mobile, but it isn't valid JSX (and it might not be related to JSX at all). It shouldn't panic, but cause a syntax parse error.
Fixed upstream, should be fixed next swc update.
@kitsonk @dsherret thanks. After further investigation on my end I have not found a JSX way to add the doctype tag. So I resorted to prepending that string in the response stream.
Noob Alert This my first deno project, I started using deno and deno deploy maybe about 3 weeks ago (and I'm loving it for the most part) - I am a bit in over my head submitting this issue, but wanted to give back.
Developer's Intention:
Complication:
/** @jsxFrag Fragment */
to accomplish an overarching page structure that includes a jsx fragment and a<!doctype html>
elementSomething like
Project Pinpoint for Context
Estimated Solution
deno
might be a "will not fix" - totally fine, just wanted to give back with a bug report.Full Backtrace Provided Below is the backtrace as requested from std out.