Skip to content

Commit

Permalink
fix: change import to default in package exports (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
cseas authored Feb 28, 2023
1 parent dbfdf0e commit cbb1424
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .changeset/two-carrots-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@razorpay/blade': patch
---

fix: change import to default in package exports

Jest does not support the "import" condition in exports. This was causing tests to fail for Blade consumers. Changed "import" to "default" which is supported by all tools. Since Blade is not exporting a dual package, we don't need the "import" condition.
24 changes: 12 additions & 12 deletions packages/blade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,32 @@
"exports": {
"./components": {
"react-native": {
"import": "./build/components/index.native.js",
"types": "./build/components/index.native.d.ts"
"types": "./build/components/index.native.d.ts",
"default": "./build/components/index.native.js"
},
"default": {
"import": "./build/components/index.web.js",
"types": "./build/components/index.d.ts"
"types": "./build/components/index.d.ts",
"default": "./build/components/index.web.js"
}
},
"./tokens": {
"react-native": {
"import": "./build/tokens/index.native.js",
"types": "./build/tokens/index.native.d.ts"
"types": "./build/tokens/index.native.d.ts",
"default": "./build/tokens/index.native.js"
},
"default": {
"import": "./build/tokens/index.web.js",
"types": "./build/tokens/index.d.ts"
"types": "./build/tokens/index.d.ts",
"default": "./build/tokens/index.web.js"
}
},
"./utils": {
"react-native": {
"import": "./build/utils/index.native.js",
"types": "./build/utils/index.native.d.ts"
"types": "./build/utils/index.native.d.ts",
"default": "./build/utils/index.native.js"
},
"default": {
"import": "./build/utils/index.web.js",
"types": "./build/utils/index.d.ts"
"types": "./build/utils/index.d.ts",
"default": "./build/utils/index.web.js"
}
}
},
Expand Down

0 comments on commit cbb1424

Please sign in to comment.