Skip to content

Commit 6cecb10

Browse files
kubeclaude
andcommitted
Add web-worker to hash-frontend for elkjs compatibility
elkjs/lib/main.js calls require.resolve('web-worker') inside a try/catch, but Webpack statically analyzes it and fails if the package is not resolvable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f171147 commit 6cecb10

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

apps/hash-frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@
127127
"signia-react": "0.1.5",
128128
"url-regex-safe": "4.0.0",
129129
"use-font-face-observer": "1.3.0",
130-
"uuid": "13.0.0"
130+
"uuid": "13.0.0",
131+
"web-worker": "1.4.1"
131132
},
132133
"devDependencies": {
133134
"@graphql-codegen/cli": "^5.0.3",

libs/@hashintel/petrinaut/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function useMyHook() {
2626
}
2727
```
2828

29-
The compiler runs with `panicThreshold: "CRITICAL_ERRORS"` — the build fails if it encounters critical errors not opted out via `"use no memo"`.
29+
The compiler runs with `panicThreshold: "critical_errors"` — the build fails if it encounters critical errors not opted out via `"use no memo"`.
3030

3131
## Commands
3232

libs/@hashintel/petrinaut/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"react-resizable-panels": "4.6.5",
5050
"typescript": "5.9.3",
5151
"uuid": "13.0.0",
52-
"vscode-languageserver-types": "3.17.5"
52+
"vscode-languageserver-types": "3.17.5",
53+
"web-worker": "1.4.1"
5354
},
5455
"devDependencies": {
5556
"@hashintel/ds-helpers": "workspace:*",

yarn.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ __metadata:
661661
use-font-face-observer: "npm:1.3.0"
662662
uuid: "npm:13.0.0"
663663
wait-on: "npm:9.0.1"
664+
web-worker: "npm:1.4.1"
664665
webpack: "npm:5.104.1"
665666
languageName: unknown
666667
linkType: soft
@@ -7979,6 +7980,7 @@ __metadata:
79797980
vite: "npm:8.0.0"
79807981
vitest: "npm:4.1.0"
79817982
vscode-languageserver-types: "npm:3.17.5"
7983+
web-worker: "npm:1.4.1"
79827984
peerDependencies:
79837985
"@hashintel/ds-components": "workspace:^"
79847986
"@hashintel/ds-helpers": "workspace:^"
@@ -45972,6 +45974,13 @@ __metadata:
4597245974
languageName: node
4597345975
linkType: hard
4597445976

45977+
"web-worker@npm:1.4.1":
45978+
version: 1.4.1
45979+
resolution: "web-worker@npm:1.4.1"
45980+
checksum: 10c0/8b5e6099692ad83e0bcd72595e9bbec9c5cc0c910215dce21379050c9a96d9678f651c161e58f29d5ecf62d50bbd897543b4fa1bcea83cd273dbf219fdda1089
45981+
languageName: node
45982+
linkType: hard
45983+
4597545984
"webextension-polyfill@npm:0.12.0":
4597645985
version: 0.12.0
4597745986
resolution: "webextension-polyfill@npm:0.12.0"

0 commit comments

Comments
 (0)