mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(producer): externalize postcss to fix ESM dynamic require
postcss is a CJS module that uses `require("path")` internally.
When esbuild bundles it into the ESM producer output, the dynamic
require call fails at runtime with "Dynamic require of path is
not supported". This broke `npx tsx cli render` and `npx tsx cli
preview` from the local dev build.
Fix: add postcss to the external list alongside puppeteer and
esbuild — it stays as a runtime dependency resolved from
node_modules instead of being bundled.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Miguel Ángel
co-authored by
Claude Opus 4.6
parent
f56b4c8620
commit
2bde83d5e3
@@ -36,7 +36,7 @@ await Promise.all([
|
||||
platform: "node",
|
||||
target: "node22",
|
||||
format: "esm",
|
||||
external: ["puppeteer", "esbuild"],
|
||||
external: ["puppeteer", "esbuild", "postcss"],
|
||||
plugins: [workspaceAliasPlugin],
|
||||
minify: false,
|
||||
sourcemap: true,
|
||||
@@ -48,7 +48,7 @@ await Promise.all([
|
||||
platform: "node",
|
||||
target: "node22",
|
||||
format: "esm",
|
||||
external: ["puppeteer", "esbuild"],
|
||||
external: ["puppeteer", "esbuild", "postcss"],
|
||||
plugins: [workspaceAliasPlugin],
|
||||
minify: false,
|
||||
sourcemap: true,
|
||||
|
||||
Reference in New Issue
Block a user