Skip to content

Commit

Permalink
Adds exports."./react" to package.json
Browse files Browse the repository at this point in the history
Also removes "exports" property from package.react.json in react-hooks
folder that is copied to `react` build folder. This file now only has
`"main": "./cjs/index.js"`, which, for not obvious reason to me, needs
to be present in order for `npx attw` check to not show "Resolution
failed" error for node10 for "ably/react" path.

Resolves #1622
  • Loading branch information
VeskeR committed Feb 19, 2024
1 parent af2e916 commit 72c131e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"./modules": {
"types": "./modules.d.ts",
"default": "./build/modules/index.js"
},
"./react": {
"require": "./react/cjs/index.js",
"import": "./react/mjs/index.js"
}
},
"typings": "./ably.d.ts",
Expand Down
6 changes: 1 addition & 5 deletions src/platform/react-hooks/res/package.react.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"main": "./cjs/index.js",
"exports": {
"require": "./cjs",
"import": "./mjs"
}
"main": "./cjs/index.js"
}

0 comments on commit 72c131e

Please sign in to comment.