-
Notifications
You must be signed in to change notification settings - Fork 48.8k
Add "exports" field to use-sync-external-store's package.json #24440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,6 +17,15 @@ | |||||||||||
"shim/", | ||||||||||||
"cjs/" | ||||||||||||
], | ||||||||||||
"exports": { | ||||||||||||
".": "./index.js", | ||||||||||||
"./with-selector": "./with-selector.js", | ||||||||||||
"./shim": "./shim/index.js", | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thoughts on
Suggested change
? That way all code can just be note that this relies on the bundler actually supporting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. facebook/metro#670 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, so no issue. This stanza should still work for any modern bundler, and metro whenever it enters the future There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's Repack to consider (basically Webpack for react-native) so we might as well get this in now. Doing it in the future might be considered another breaking change. |
||||||||||||
"./shim/index.native": "./shim/index.native.js", | ||||||||||||
"./shim/with-selector": "./shim/with-selector.js", | ||||||||||||
"./src/*": "./src/*", | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't this require changing the publish script? The latest version of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that the react package has this line. react/packages/react/package.json Line 30 in 3613284
|
||||||||||||
"./package.json": "./package.json" | ||||||||||||
}, | ||||||||||||
"license": "MIT", | ||||||||||||
"peerDependencies": { | ||||||||||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0" | ||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is used internally. The published entrypoints are in
npm/
which can continue using relative imports.