From 203abf969fe4a489be3df609af6ff4a78df5556c Mon Sep 17 00:00:00 2001 From: Anthony Frehner Date: Sat, 17 Dec 2022 12:06:15 -0700 Subject: [PATCH] Fixes issues with require() calls in non-node envs (#99) Also remove unnecessary "production" conditions as it'll just use the default condition which is the same. --- .changeset/selfish-teachers-sort.md | 5 +++++ packages/react/package.json | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .changeset/selfish-teachers-sort.md diff --git a/.changeset/selfish-teachers-sort.md b/.changeset/selfish-teachers-sort.md new file mode 100644 index 00000000..b70a6cf6 --- /dev/null +++ b/.changeset/selfish-teachers-sort.md @@ -0,0 +1,5 @@ +--- +'@shopify/hydrogen-react': patch +--- + +Fix bad path for `require()` statements in non-Node environments. diff --git a/packages/react/package.json b/packages/react/package.json index 53db7e02..9966c4e2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -22,13 +22,11 @@ "require": { "types": "./dist/types/index.d.cts", "development": "./dist/node-dev/index.js", - "production": "./dist/node-prod/index.js", "default": "./dist/node-prod/index.js" }, "import": { "types": "./dist/types/index.d.ts", "development": "./dist/node-dev/index.mjs", - "production": "./dist/node-prod/index.mjs", "default": "./dist/node-prod/index.mjs" }, "default": "./dist/node-prod/index.js" @@ -36,20 +34,17 @@ "module": { "types": "./dist/types/index.d.ts", "development": "./dist/browser-dev/index.mjs", - "production": "./dist/browser-prod/index.mjs", "default": "./dist/browser-prod/index.mjs" }, "import": { "types": "./dist/types/index.d.ts", "development": "./dist/browser-dev/index.mjs", - "production": "./dist/browser-prod/index.mjs", "default": "./dist/browser-prod/index.mjs" }, "require": { "types": "./dist/types/index.d.cts", - "development": "./dist/browser-dev/index.js", - "production": "./dist/browser-prod/index.js", - "default": "./dist/browser-prod/index.js" + "development": "./dist/node-dev/index.js", + "default": "./dist/node-prod/index.js" }, "default": "./dist/browser-prod/index.mjs" },