Skip to content

Commit ccc9e08

Browse files
kubeclaude
andcommitted
Bundle elkjs into petrinaut instead of externalizing it
Import from elkjs/lib/elk-api (synchronous API) instead of the main entry point, and move elkjs to devDependencies so it gets bundled into the dist output. This avoids the web-worker resolution issue entirely since elk-api doesn't reference it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a769a19 commit ccc9e08

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

libs/@hashintel/petrinaut/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"@monaco-editor/react": "4.8.0-rc.3",
4444
"@xyflow/react": "12.10.1",
4545
"d3-scale": "4.0.2",
46-
"elkjs": "0.11.0",
4746
"monaco-editor": "0.55.1",
4847
"react-icons": "5.5.0",
4948
"react-resizable-panels": "4.6.5",
@@ -65,6 +64,7 @@
6564
"@typescript/native-preview": "7.0.0-dev.20260315.1",
6665
"@vitejs/plugin-react": "6.0.1",
6766
"babel-plugin-react-compiler": "1.0.0",
67+
"elkjs": "0.11.0",
6868
"jsdom": "24.1.3",
6969
"oxlint": "1.55.0",
7070
"oxlint-tsgolint": "0.17.0",

libs/@hashintel/petrinaut/src/lib/calculate-graph-layout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { ElkNode } from "elkjs";
2-
import ELK from "elkjs";
1+
import type { ElkNode } from "elkjs/lib/elk-api";
2+
import ELK from "elkjs/lib/elk-api";
33

44
import type { SDCPN } from "../core/types/sdcpn";
55

libs/@hashintel/petrinaut/vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export default defineConfig(({ command }) => ({
6666
plugins: [
6767
esmExternalRequirePlugin({
6868
external: [
69-
"elkjs",
7069
"react/compiler-runtime",
7170
"react/jsx-runtime",
7271
"react/jsx-dev-runtime",

0 commit comments

Comments
 (0)