-
-
Notifications
You must be signed in to change notification settings - Fork 265
Description
@echo off
echo 🚀 开始构建...
echo 当前路径: %~dp0
echo.
call npx tsup ./index.ts --format esm --target node18 --outDir dist --clean --sourcemap --dts-resolve --external "*" --no-treeshake
if %errorlevel% == 0 (
echo.
echo ✅ 构建成功!
) else (
echo.
echo ❌ 构建失败!
)
echo.
pause
PS F:\pro\1\packages\lib-vanilla\electronBase\main> .\build.bat
? 开始构建...
当前路径: F:\pro\1\packages\lib-vanilla\electronBase\main\
CLI Building entry: index.ts
CLI Using tsconfig: ....\tsconfig.json
CLI tsup v8.5.0
CLI Target: node18
CLI Cleaning output folder
ESM Build start
ESM dist\index.mjs 332.68 KB
ESM dist\index.mjs.map 925.85 KB
ESM ⚡️ Build success in 499ms
DTS Build start
Error: namespace child (hoisting) not supported yet
24712 |
24713 | declare module 'electron' {
24714 | export = Electron.CrossProcessExports;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24715 | }
24716 |
24717 | declare module 'electron/main' {
at DeclarationScope.convertNamespace (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:5773:19)
at Transformer.convertNamespaceDeclaration (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:5912:18)
at Transformer.convertStatement (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:5891:23)
at new Transformer (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:5836:16)
at convert (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:5827:27)
at Object.transform (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:6227:29)
at handleDtsFile (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:6343:48)
at Object.transform (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\rollup.js:6382:20)
at F:\pro\1\node_modules.pnpm\rollup@4.52.4\node_modules\rollup\dist\shared\rollup.js:3392:40
Error: error occurred in dts build
at Worker. (F:\pro\1\node_modules.pnpm\tsup@8.5.0_postcss@8.5.6_tsx@4.20.6_typescript@5.8.3\node_modules\tsup\dist\index.js:1545:26)
at Worker.emit (node:events:518:28)
at MessagePort. (node:internal/worker:268:53)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)
at MessagePort. (node:internal/per_context/messageport:23:28)
DTS Build error
? 构建失败!
请按任意键继续. . .