Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

docs(example-ssr): use cjs imports #3657

Merged
merged 2 commits into from
Oct 19, 2022
Merged

docs(example-ssr): use cjs imports #3657

merged 2 commits into from
Oct 19, 2022

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Oct 19, 2022

Summary

The example is ran using node without esm, and webpack also isn't set up for proper esm, so this errors in modern node (14+) if we use esm.

Setting up for proper esm (type module etc) wouldn't be representative for most users, so we'll fall back to cjs

CR-2214

Result

using cjs imports in hooks-ssr example

The example is ran using node without esm, and webpack also isn't set up for proper esm, so this errors in modern node (14+) if we use esm.

Setting up for proper esm (type module etc) wouldn't be representative for most users, so we'll fall back to cjs

CR-2214
@Haroenv Haroenv requested review from a team, dhayab and FabienMotte and removed request for a team October 19, 2022 12:03
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 19, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9d2fa92:

Sandbox Source
react-instantsearch-app Configuration
hooks-example Configuration

@netlify
Copy link

netlify bot commented Oct 19, 2022

Deploy Preview for react-instantsearch ready!

Name Link
🔨 Latest commit 9d2fa92
🔍 Latest deploy log https://app.netlify.com/sites/react-instantsearch/deploys/634ffc502ba5e2000771855b
😎 Deploy Preview https://deploy-preview-3657--react-instantsearch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

examples/hooks-ssr/src/App.js Outdated Show resolved Hide resolved
Co-authored-by: Dhaya <154633+dhayab@users.noreply.github.com>
@Haroenv Haroenv requested a review from dhayab October 19, 2022 13:32
@Haroenv Haroenv merged commit 103e46e into master Oct 19, 2022
@Haroenv Haroenv deleted the docs/example-cjs branch October 19, 2022 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants