Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use named export for esm compat/server #3061

Merged
merged 2 commits into from
Mar 14, 2021
Merged

Conversation

marvinhagemeister
Copy link
Member

  • Ensure that we do the renderToString -> renderToStaticMarkup aliasing only here in compat/server
  • Keep backwards compat for older versions of preact-render-to-string where the module object was a function. Preferred way is to use mod.renderToString.

This PR is in preparation for preactjs/preact-render-to-string#185

@coveralls
Copy link

coveralls commented Mar 14, 2021

Coverage Status

Coverage remained the same at 99.445% when pulling 19885d3 on compat-server-export into c6ca49e on master.

@marvinhagemeister marvinhagemeister merged commit cd8d658 into master Mar 14, 2021
@marvinhagemeister marvinhagemeister deleted the compat-server-export branch March 14, 2021 12:33
This was referenced Mar 15, 2021
This was referenced Mar 15, 2021
@rahulbhadhoriya
Copy link

after this change i am getting this error while building

ERROR in ./node_modules/preact/compat/server.mjs
Module not found: Error: Can't resolve 'preact-render-to-string' in '/Users/B0216312/Desktop/node_modules/preact/compat'
@ ./node_modules/preact/compat/server.mjs 1:0-4:33 1:0-4:33 1:0-4:33
@ ./node_modules/google-maps-react/dist/components/InfoWindow.js
@ ./node_modules/google-maps-react/dist/index.js
@ ./app/modules/homes/pages/broadband/feasibility/Map.js
@ ./app/modules/homes/pages/broadband/feasibility/FeasibilitySmart.js
@ ./app/modules/homes/pages/broadband/feasibility/FeasibilityMain.js
@ ./app/modules/homes/pages/broadband/home-page/HomePage.js
@ ./app/modules/homes/lazy.js
@ ./app/modules/homes/routes.js
@ ./app/modules/homes/App.js
@ ./app/modules/homes/common/containers/Root.js
@ ./app/modules/homes/index.js
@ multi (webpack)-dev-server/client?http://0.0.0.0 (webpack)/hot/dev-server.js @babel/polyfill ./app/modules/homes/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants