Skip to content

Write HTML. Render video. Built for agents.

fix(cli): resolve SyntaxError in bundled ESM output (#203)

Vance Ingallse9c2e6f7725a
diff --git a/bun.lock b/bun.lock
index 782388523b..2ae53f19f9 100644
--- a/bun.lock
+++ b/bun.lock
@@ -35,6 +35,7 @@
"hono": "^4.0.0",
"mime-types": "^3.0.2",
"open": "^10.0.0",
+ "postcss": "^8.5.8",
"puppeteer-core": "^24.39.1",
},
"devDependencies": {
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 26b2ffc9ce..cc1ecd8a1e 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -36,6 +36,7 @@
"hono": "^4.0.0",
"mime-types": "^3.0.2",
"open": "^10.0.0",
+ "postcss": "^8.5.8",
"puppeteer-core": "^24.39.1"
},
"devDependencies": {
diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts
index 9507ffc06b..747ae71366 100644
--- a/packages/cli/tsup.config.ts
+++ b/packages/cli/tsup.config.ts
@@ -20,9 +20,9 @@ export default defineConfig({
js: `import { createRequire as __hf_createRequire } from "node:module";
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
import { dirname as __hf_dirname } from "node:path";
-const require = __hf_createRequire(import.meta.url);
-const __filename = __hf_fileURLToPath(import.meta.url);
-const __dirname = __hf_dirname(__filename);`,
+var require = __hf_createRequire(import.meta.url);
+var __filename = __hf_fileURLToPath(import.meta.url);
+var __dirname = __hf_dirname(__filename);`,
},
external: [
"puppeteer-core",
@@ -37,6 +37,7 @@ const __dirname = __hf_dirname(__filename);`,
"adm-zip",
"esbuild",
"giget",
+ "postcss",
],
noExternal: [
"@hyperframes/core",