Skip to content

Commit

Permalink
Add separate bundle exports per each env (#437)
Browse files Browse the repository at this point in the history
* feat(upload-client): add separate exports `./browser`, `./node` and `./react-native`

* feat(rest-client): add separate exports `./browser` and `./node`
  • Loading branch information
nd0ut authored Oct 28, 2022
1 parent 486fe56 commit a521ff8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
"types": "./dist/types.d.ts",
"exports": {
".": {
"types": "./dist/types.d.ts",
"node": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"default": "./dist/index.browser.js"
},
"./browser": {
"types": "./dist/types.d.ts",
"default": "./dist/index.browser.js"
},
"./node": {
"types": "./dist/types.d.ts",
"default": "./dist/index.node.js"
}
},
"sideEffects": false,
Expand Down
14 changes: 13 additions & 1 deletion packages/upload-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@
"type": "module",
"module": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"react-native": "./dist/index.react-native.js",
"types": "./dist/types.d.ts",
"exports": {
".": {
"types": "./dist/types.d.ts",
"node": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"default": "./dist/index.browser.js"
},
"./browser": {
"types": "./dist/types.d.ts",
"default": "./dist/index.browser.js"
},
"./node": {
"types": "./dist/types.d.ts",
"default": "./dist/index.node.js"
},
"./react-native": {
"types": "./dist/types.d.ts",
"default": "./dist/index.react-native.js"
}
},
"sideEffects": false,
Expand Down

0 comments on commit a521ff8

Please sign in to comment.