Skip to content

Commit 360fe3d

Browse files
committed
use-sync-external-store: Add exports field to package.json
1 parent 1e3e30d commit 360fe3d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

packages/use-sync-external-store/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
"name": "use-sync-external-store",
33
"description": "Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks.",
44
"version": "1.2.0",
5+
"exports": {
6+
".": "./index.js",
7+
"./with-selector": "./with-selector.js",
8+
"./shim": {
9+
"react-native": "./shim/index.native.js",
10+
"default": "./shim/index.js"
11+
},
12+
"./shim/index.native": "./shim/index.native.js",
13+
"./shim/with-selector": "./shim/with-selector.js",
14+
"./package.json": "./package.json"
15+
},
516
"repository": {
617
"type": "git",
718
"url": "https://github.com/facebook/react.git",

packages/use-sync-external-store/src/useSyncExternalStoreWithSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

1414
// Intentionally not using named imports because Rollup uses dynamic dispatch
1515
// for CommonJS interop.

0 commit comments

Comments
 (0)