fix(cli): resolve ESM module resolution for tsx dev mode

- Remove "type": "module" from apps/cli/package.json to avoid
  ESM/CJS interop issues with workspace packages in tsx dev mode
- Configure tsup to output .mjs files (always treated as ESM by Node.js)
- Rename bin entry from chatlab.js to chatlab.mjs
- Change chatlab web default port to 3100 (serve keeps 3110)
- Fix vite plugin: use pnpm instead of npx for tsx invocation
This commit is contained in:
digua committed 2026-05-19 22:13:00 +08:00
1 parent e363e8bd75
commit 0aa30359ab
5 files changed
+8 -8

No files matched your search

+3 -4
View File
@@ -1,12 +1,11 @@
{
"name": "chatlab-cli",
"version": "0.1.0",
"description": "ChatLab CLI & Service - 聊天记录分析工具",
"type": "module",
"description": "ChatLab CLI & Service - Chat history analysis tool",
"bin": {
"chatlab": "./bin/chatlab.js"
"chatlab": "./bin/chatlab.mjs"
},
"main": "./dist/index.js",
"main": "./dist/index.mjs",
"files": [
"bin/",
"dist/",