Skip to content

Commit

Permalink
V2: Note Parcel and Metro settings for package.json exports (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Aug 1, 2024
1 parent a935a8a commit b155590
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions bundle-size/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"./vite",
"./webpack"
],
"//": "Required for parcel - see https://parceljs.org/features/dependency-resolution/#package-exports",
"@parcel/resolver-default": {
"packageExports": true
},
Expand Down
2 changes: 1 addition & 1 deletion bundle-size/parcel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ts": "dist/ts/index.dc635180.js"
},
"type": "module",
"//": "otherwise, parcel shakes everything away",
"//": "Required for parcel at the root package.json - see https://parceljs.org/features/dependency-resolution/#package-exports",
"@parcel/resolver-default": {
"packageExports": true
},
Expand Down
5 changes: 5 additions & 0 deletions react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ Use `buf` to generate the compiled protos via protobuf-es
### `npm run web`

Starts the app in Expo's `web` mode, which will allow you to see it running in a browser.

## Metro

Connect-ES and Protobuf-ES use package exports. If you use [metro](https://github.com/facebook/metro),
make sure to [enable them](https://metrobundler.dev/docs/package-exports/).
1 change: 1 addition & 0 deletions react/parcel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"check": "tsc --noEmit",
"ci": "npm run generate && npm run check && npm run build && npm run test"
},
"//": "Required for parcel at the root package.json - see https://parceljs.org/features/dependency-resolution/#package-exports",
"@parcel/resolver-default": {
"packageExports": true
},
Expand Down

0 comments on commit b155590

Please sign in to comment.