Skip to content

Commit

Permalink
use-sync-external-store: Add exports field to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Nov 9, 2022
1 parent 1e3e30d commit 360fe3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/use-sync-external-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
"name": "use-sync-external-store",
"description": "Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks.",
"version": "1.2.0",
"exports": {
".": "./index.js",
"./with-selector": "./with-selector.js",
"./shim": {
"react-native": "./shim/index.native.js",
"default": "./shim/index.js"
},
"./shim/index.native": "./shim/index.native.js",
"./shim/with-selector": "./shim/with-selector.js",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import * as React from 'react';
import is from 'shared/objectIs';
import {useSyncExternalStore} from 'use-sync-external-store/src/useSyncExternalStore';
import {useSyncExternalStore} from './useSyncExternalStore';

// Intentionally not using named imports because Rollup uses dynamic dispatch
// for CommonJS interop.
Expand Down

0 comments on commit 360fe3d

Please sign in to comment.