Skip to content

Commit cbb1424

Browse files
authored
fix: change import to default in package exports (#1028)
1 parent dbfdf0e commit cbb1424

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.changeset/two-carrots-provide.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@razorpay/blade': patch
3+
---
4+
5+
fix: change import to default in package exports
6+
7+
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.

packages/blade/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -29,32 +29,32 @@
2929
"exports": {
3030
"./components": {
3131
"react-native": {
32-
"import": "./build/components/index.native.js",
33-
"types": "./build/components/index.native.d.ts"
32+
"types": "./build/components/index.native.d.ts",
33+
"default": "./build/components/index.native.js"
3434
},
3535
"default": {
36-
"import": "./build/components/index.web.js",
37-
"types": "./build/components/index.d.ts"
36+
"types": "./build/components/index.d.ts",
37+
"default": "./build/components/index.web.js"
3838
}
3939
},
4040
"./tokens": {
4141
"react-native": {
42-
"import": "./build/tokens/index.native.js",
43-
"types": "./build/tokens/index.native.d.ts"
42+
"types": "./build/tokens/index.native.d.ts",
43+
"default": "./build/tokens/index.native.js"
4444
},
4545
"default": {
46-
"import": "./build/tokens/index.web.js",
47-
"types": "./build/tokens/index.d.ts"
46+
"types": "./build/tokens/index.d.ts",
47+
"default": "./build/tokens/index.web.js"
4848
}
4949
},
5050
"./utils": {
5151
"react-native": {
52-
"import": "./build/utils/index.native.js",
53-
"types": "./build/utils/index.native.d.ts"
52+
"types": "./build/utils/index.native.d.ts",
53+
"default": "./build/utils/index.native.js"
5454
},
5555
"default": {
56-
"import": "./build/utils/index.web.js",
57-
"types": "./build/utils/index.d.ts"
56+
"types": "./build/utils/index.d.ts",
57+
"default": "./build/utils/index.web.js"
5858
}
5959
}
6060
},

0 commit comments

Comments
 (0)