Skip to content

Commit

Permalink
fix: dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
imrishabh18 committed Aug 19, 2024
1 parent a51d74b commit bab6247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cli/lib/cmd-fns/render.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { circuitToPng } from "circuit-to-png"
import fs from "fs"
import { soupify } from "cli/lib/soupify"
import type { AppContext } from "cli/lib/util/app-context"
import fs from "fs"
import path from "path"

export const renderCmd = async (
Expand Down Expand Up @@ -38,7 +37,7 @@ export const renderCmd = async (
},
ctx,
)

const { circuitToPng } = await import("circuit-to-png")
const soupBuffer = circuitToPng(soup, viewType)

fs.writeFileSync(outputFile, soupBuffer)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"archiver": "^7.0.1",
"axios": "^1.6.7",
"chokidar": "^3.6.0",
"circuit-to-png": "^0.0.3",
"commander": "^12.0.0",
"configstore": "^6.0.0",
"dargs": "^8.1.0",
Expand Down Expand Up @@ -115,7 +116,6 @@
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.20",
"ava": "^6.1.1",
"circuit-to-png": "^0.0.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^1.0.0",
Expand Down

0 comments on commit bab6247

Please sign in to comment.