[ECO-4776] Re-add main
and browser
fields to package.json
#1782
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Those fields were removed in de5ddfa and replaced with
exports
field we currently use. However, removal of root level entry fields frompackage.json
have caused issues with importingably
in some setups:ably
at all, due toexports
field resolution is not enabled by default yet [1] (we fixed this by re-adding root levelreact-native
field in fix: react-native TextEncoder/TextDecoder polyfill + restore package.json react-native field #1713)exports
field, for example, webpack has added support forexports
only in v5.exports
field only in its 4.7 release [2]This commit re-adds root level entry fields so those setups will still be able to resolve
ably
package.Resolves #1751
[1] https://reactnative.dev/blog/2023/06/21/package-exports-support
[2] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#packagejson-exports-imports-and-self-referencing