diff options
| author | YurenHao0426 <blackhao0426@gmail.com> | 2026-09-13 04:20:02 +0000 |
|---|---|---|
| committer | YurenHao0426 <blackhao0426@gmail.com> | 2026-09-13 04:20:02 +0000 |
| commit | 55bf3f24c57521907a1bac7180aa29ea8cbf83d7 (patch) | |
| tree | 11f8e11e27854c01ea7bb9c8ec97f1d513deeecb /package.json | |
| parent | c14704c46a47418e77d6f1ad76f6c204b15c056b (diff) | |
CLI: give the ESM bundle a real require() so bundled CJS deps (ws, http) load
auth --from-cdp failed with 'Dynamic require of "http" is not supported'.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package.json b/package.json index d187d6a..71418b3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "dev": "electron-vite dev", "build": "electron-vite build && npx esbuild src/mcp/lattex.mjs --bundle --platform=node --format=esm --outfile=out/mcp/lattex.mjs", - "build:cli": "npx esbuild src/cli/main.ts --bundle --platform=node --format=esm --target=node18 --outfile=out/cli/lattex-cli.mjs --external:ws", + "build:cli": "npx esbuild src/cli/main.ts --bundle --platform=node --format=esm --target=node18 --outfile=out/cli/lattex-cli.mjs --external:ws --banner:js=\"import { createRequire as __cr } from 'module'; const require = __cr(import.meta.url);\"", "typecheck:cli": "npx tsc --project tsconfig.cli.json --noEmit", "test:cli": "node --experimental-vm-modules out/cli/test.mjs", "preview": "electron-vite preview", |
