You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When react-merge-refs is imported by a project, its CJS & ESM distributions are not properly identified, causing only the CJS dist to be registered. react-merge-refs's package.json uses only the non-standard webpack "module" field.
To Reproduce
Steps to reproduce the behavior:
Install react-merge-refs as a dependency of any ESM project
I am happy to send a PR to fix this, if you could first confirm your compatibility support—specifically, do you care about very old versions of Node.js? (I don't see anything in react-merge-refs's configs that would suggest you do, and I see you're targeting ESNext, so I would think from that you don't). Supporting very old versions is possible but is significantly more complicated and would add complexity to the project (whereas not won't add much complexity at all).
The text was updated successfully, but these errors were encountered:
- Downgrade `react-merge-refs` to `^1.10`
- `^2.0.0` is ESM-only (https://github.com/gregberge/react-merge-refs/releases/tag/v2.0.0), making integration in various projects (namely Next.js) difficult at the moment
- This may cause issues in environments like jest: gregberge/react-merge-refs#16
- Currently not an issue, as there are no tests
- Remove `@docsearch/css` import from Search
- Next.js requires all global CSS to be imported in the top-level App component
- Add instructions to README
- Downgrade `react-merge-refs` to `^1.10`
- `^2.0.0` is ESM-only (https://github.com/gregberge/react-merge-refs/releases/tag/v2.0.0), making integration in various projects (namely Next.js) difficult at the moment
- This may cause issues in environments like jest: gregberge/react-merge-refs#16
- Currently not an issue, as there are no tests
- Remove `@docsearch/css` import from Search
- Next.js requires all global CSS to be imported in the top-level App component
- Move it from deps to peerDeps
- Add instructions to README
🐛 Bug Report
When
react-merge-refs
is imported by a project, its CJS & ESM distributions are not properly identified, causing only the CJS dist to be registered.react-merge-refs
's package.json uses only the non-standard webpack"module"
field.To Reproduce
Steps to reproduce the behavior:
react-merge-refs
as a dependency of any ESM projectimport
it in any file (extest.mjs
)test.mjs
with Node.js (node ./test.mjs
)Live repro
Expected behavior
The ESM distribution should get used.
I am happy to send a PR to fix this, if you could first confirm your compatibility support—specifically, do you care about very old versions of Node.js? (I don't see anything in
react-merge-refs
's configs that would suggest you do, and I see you're targeting ESNext, so I would think from that you don't). Supporting very old versions is possible but is significantly more complicated and would add complexity to the project (whereas not won't add much complexity at all).The text was updated successfully, but these errors were encountered: