Skip to content

Commit

Permalink
Add built-in dependencies to speed up hydrogen load times (#4554)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsbajorics authored Nov 23, 2023
1 parent c44e0ac commit 05277fd
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 20 deletions.
3 changes: 3 additions & 0 deletions editor/jest-setup-beforeall.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ jest.mock('./src/core/workers/worker-import-utils')
// that otherwise is not available in the Jest environment.
import { Crypto } from '@peculiar/webcrypto'
globalThis.crypto = new Crypto()

// This is needed so that loading @shopify/hydrogen in Jest tests doesn't fail with `ReferenceError: Response is not defined`
require('isomorphic-fetch')
5 changes: 4 additions & 1 deletion editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@
"@emotion/styled-base": "11.0.0",
"@liveblocks/client": "1.7.1",
"@liveblocks/react": "1.7.1",
"@liveblocks/yjs": "1.7.1",
"@liveblocks/react-comments": "1.7.1",
"@liveblocks/yjs": "1.7.1",
"@popperjs/core": "2.4.4",
"@remix-run/react": "2.0.1",
"@remix-run/server-runtime": "2.3.1",
"@root/encoding": "1.0.1",
"@seznam/compose-react-refs": "^1.0.4",
"@shopify/hydrogen": "2023.10.2",
"@stitches/react": "1.2.8",
"@svgr/plugin-jsx": "5.5.0",
"@tippyjs/react": "4.1.0",
Expand Down Expand Up @@ -341,6 +343,7 @@
"husky": "^7.0.2",
"ignore-styles": "5.0.1",
"immutable": "3.8.1",
"isomorphic-fetch": "3.0.0",
"jStat": "1.5.3",
"jest": "27.2.2",
"jest-clean-console-reporter": "0.3.0",
Expand Down
185 changes: 178 additions & 7 deletions editor/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 05277fd

Please sign in to comment.