Closed yocontra closed 7 years ago
@contra this is definitely something we should fix.. the only solution I see at the moment will require a breaking change. I'll try to make a v3-beta
release today.
@contra As I don't have any preact
applications at the moment, do you mind help me test the beta once it's ready?
@contra please try react-document-meta@next
(resolving to 3.0.0-beta.0
), if you use any of the two SSR methods DocumentMeta.renderAsHTML()
or DocumentMeta.renderToStaticMarkup()
then DocumentMeta
must be imported from react-document-meta/server
. Nothing else is changed..
@danieljuhl I'll give it a whirl, thanks!
If you want to test it, here's the aliases I'm using in webpack:
alias: {
'preact-compat': 'preact-compat/dist/preact-compat',
react: 'preact-compat',
'react-dom': 'preact-compat',
'create-react-class': 'preact-compat/lib/create-react-class'
}
Seems to have done the trick, I'll close this now - thanks again for the quick response.
Not sure if you're interested in fixing this, but since this module always requires the server-side react-dom (even on the frontend!) it doesn't work with preact (via preact-compat) since
preact-compat/server
is not a thing.Even if you don't care about preact, we should probably fix this to reduce the amount of code going into front-end only builds.