Closed lfre closed 2 years ago
Repro: https://github.com/lfre/preact-render-to-string-issue
preact-render-to-string 5.2.4+ throws errors in Development mode. Three things cause this:
preact-render-to-string
esmExternals
false
preact/debug
function MyComponent({ name }) { return <div>My {name}</div> }
Same issue on my end, in my case import useSWR from 'swr' is the cause (as opposed to preact-render-to-string )
import useSWR from 'swr'
Confirming this is fixed on preact-render-to-string 5.2.6 👍
Repro: https://github.com/lfre/preact-render-to-string-issue
preact-render-to-string
5.2.4+ throws errors in Development mode. Three things cause this:esmExternals
experiment property is set tofalse
. This is needed to resolve related issues: https://github.com/preactjs/next-plugin-preact/issues/53 https://github.com/preactjs/next-plugin-preact/issues/25preact/debug
entry added in development. Ref