From 901076592c2515d42676cb9afb0f680e7b64d9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Wed, 18 Sep 2024 17:23:27 +0200 Subject: [PATCH] fix(javascript): react-native lite resolution (#3771) --- .../packages/requester-browser-xhr/package.json | 1 + .../packages/requester-fetch/package.json | 1 + templates/javascript/clients/package.mustache | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/clients/algoliasearch-client-javascript/packages/requester-browser-xhr/package.json b/clients/algoliasearch-client-javascript/packages/requester-browser-xhr/package.json index a94fbcb666..164997208c 100644 --- a/clients/algoliasearch-client-javascript/packages/requester-browser-xhr/package.json +++ b/clients/algoliasearch-client-javascript/packages/requester-browser-xhr/package.json @@ -18,6 +18,7 @@ }, "./src/*": "./src/*.ts" }, + "react-native": "./dist/requester.xhr.js", "files": [ "dist", "src", diff --git a/clients/algoliasearch-client-javascript/packages/requester-fetch/package.json b/clients/algoliasearch-client-javascript/packages/requester-fetch/package.json index 49e6cbe633..aac0e69980 100644 --- a/clients/algoliasearch-client-javascript/packages/requester-fetch/package.json +++ b/clients/algoliasearch-client-javascript/packages/requester-fetch/package.json @@ -34,6 +34,7 @@ }, "./src/*": "./src/*.ts" }, + "react-native": "./dist/requester.fetch.browser.js", "files": [ "dist", "src", diff --git a/templates/javascript/clients/package.mustache b/templates/javascript/clients/package.mustache index eacfddbe76..d4b3d82b2d 100644 --- a/templates/javascript/clients/package.mustache +++ b/templates/javascript/clients/package.mustache @@ -106,7 +106,10 @@ }, "jsdelivr": "./dist/algoliasearch.umd.js", "unpkg": "./dist/algoliasearch.umd.js", - "react-native": "./dist/browser.js", + "react-native": { + ".": "./dist/browser.js", + "./lite": "./dist/lite/builds/browser.js" + }, "files": [ "dist", "builds",