Closed wis closed 3 years ago
@wis this appears to be resolved with latest version of next and preact. So once #26 is merged this should work by default.
Hey @osdevisnot I tried your patch in #26, installed the newer packages, I also tried installing preact from the master branch which was last committed to 4 days ago, 6 days after the last release (didn't try installing next from repo, bc it's big), and the same issue persisted.
What I've found out though, interestingly, is that this error only happens in dev mode, and not in serve mode. <-- might be relevant/useful (along with info in OP) to https://github.com/vercel/next.js/issues/17854
You might have found that it was resolved in serve mode, can you try dev mode?
Indeed, this happens only in dev mode. I verified removing __self
fixes this problem, but I am not sure if that's the correction solution here. As a workaround, downgrading next to 9.5.3
fixes this issue.
Hey Jason, thank you for making Preact and this repo :smiley:
All I did was add a _document.js and _app.js with a next/head element:
_document.js:
_app.js:
and now it errors on SSR:
when you comment out the
<Head>
tag in _app.js the error is gone, I didn't need to comment it out in _document.js where I'm using it similarly, which is puzzling.here's the repro repo (forked from this): https://github.com/wis/nextjs-preact-demo