diff --git a/.changeset/two-carrots-provide.md b/.changeset/two-carrots-provide.md new file mode 100644 index 00000000000..fbf60b0835e --- /dev/null +++ b/.changeset/two-carrots-provide.md @@ -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. diff --git a/packages/blade/package.json b/packages/blade/package.json index 937ae8c8436..04504d21180 100644 --- a/packages/blade/package.json +++ b/packages/blade/package.json @@ -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" } } },