preact
preact copied to clipboard
10.5.13 breaks something in compat/server.mjs (vs. 10.5.12)
When I upgrade npm packages in my project, preact 10.5.13 breaks my webpack build with this error:
ERROR in ./node_modules/preact/compat/server.mjs 1:0-4:33 Can't reexport the named export 'renderToString' from non EcmaScript module (only default export is available) @ ./node_modules/@apollo/react-ssr/lib/react-ssr.esm.js @ ./node_modules/react-apollo/lib/react-apollo.esm.js @ ...
Downgrading to preact 10.5.12 fixes the issue... so something is broken in 10.5.13?!
Can you list the version of webpack and whatever other bundler youre using?
"webpack": "^4.46.0"
This is related to #3059 + #3061.
What version of preact-render-to-string
do you have?
"preact-render-to-string": "^5.1.18"
Hey! Chiming in to say that I’m also seeing this issue with the following versions:
"preact": "^10.6.4"
"preact-render-to-string": "^5.1.19"
"webpack": "^4.46.0"
Error still existing :(
"preact": "~10.7.1",
"preact-render-to-string": "~5.2.0",
app_1 | ERROR in ../../node_modules/preact/compat/server.mjs 1:0-97
app_1 | Module not found: Error: Can't resolve 'preact-render-to-string' in '/root/app/node_modules/preact/compat'
Additional issue in my side:
app_1 | export 'renderToStaticMarkup' (imported as 'renderToStaticMarkup') was not found in 'react-dom/server' (module has no exports)
I just wanted to tryout quickly preact over react but the journey stop there today, any help would be apreciated so I can do a benchmark on our app and status on the use of preact :)
I'm using latest babel ~7.17.9 & webpack ~5.72.0 and all the alias are correctly defined.
Just checked and I can't reproduce the issue anymore with the latest preact version and latest version of preact-render-to-string
🎉