File tree Expand file tree Collapse file tree 6 files changed +805
-4
lines changed
Expand file tree Collapse file tree 6 files changed +805
-4
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,4 @@ debug-output
4242
4343# Snapshot diff files
4444* .diff.png
45+ .vercel
Original file line number Diff line number Diff line change 11import type { CircuitJson } from "circuit-json"
2- import type { Triangle as GLTFTriangle } from "circuit-json-to-gltf"
3- import { convertCircuitJsonTo3D } from "circuit-json-to-gltf"
42import type { Ref } from "stepts"
3+ import type { Triangle as GLTFTriangle } from "circuit-json-to-gltf"
54import type { Repository } from "stepts"
65import {
76 AdvancedFace ,
@@ -315,6 +314,13 @@ export async function generateComponentMeshes(
315314 return e
316315 } )
317316
317+ // Dynamically import circuit-json-to-gltf to avoid bundling native dependencies
318+ // Use a variable to prevent the bundler from statically analyzing the import
319+ const gltfModule = "circuit-json-to-gltf"
320+ const { convertCircuitJsonTo3D } = await import (
321+ /* @vite -ignore */ gltfModule
322+ )
323+
318324 // Convert circuit JSON to 3D scene
319325 const scene3d = await convertCircuitJsonTo3D ( filteredCircuitJson , {
320326 boardThickness,
Original file line number Diff line number Diff line change 99 "test:update-snapshots" : " BUN_UPDATE_SNAPSHOTS=1 bun test" ,
1010 "build" : " tsup-node ./lib/index.ts --format esm --dts" ,
1111 "format" : " biome format --write ." ,
12- "format:check" : " biome format ."
12+ "format:check" : " biome format ." ,
13+ "start" : " bun site/index.html" ,
14+ "build:site" : " bun build site/index.html --outdir=site-export"
1315 },
1416 "devDependencies" : {
1517 "@biomejs/biome" : " ^2.3.8" ,
18+ "@resvg/resvg-js" : " ^2.6.2" ,
19+ "@resvg/resvg-wasm" : " ^2.6.2" ,
1620 "@types/bun" : " latest" ,
1721 "circuit-json" : " ^0.0.286" ,
1822 "looks-same" : " ^10.0.1" ,
You can’t perform that action at this time.
0 commit comments