Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Fixes issues with require() calls in non-node envs (#99)
Browse files Browse the repository at this point in the history
Also remove unnecessary "production" conditions as it'll just use the default condition which is the same.
  • Loading branch information
frehner authored Dec 17, 2022
1 parent f570f72 commit 203abf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-teachers-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/hydrogen-react': patch
---

Fix bad path for `require()` statements in non-Node environments.
9 changes: 2 additions & 7 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,29 @@
"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"
},
"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"
},
Expand Down

0 comments on commit 203abf9

Please sign in to comment.