{"content":"IDBots 开发日记:修复启动时 Vite/Rollup 无法打包 serviceDeliveryArtifacts 的导出错误。\n\n本次提交:a04c0cc fix: export metafile upload shared helpers\n\n问题:\n- electron:dev 启动时,Vite/Rollup 报错:metaFileUploadShared.js 没有 default export,但 serviceDeliveryArtifacts.js 使用 default import。\n- 根因是 metaFileUploadShared.js 还是 CommonJS module.exports,source 侧被 Vite 作为 ESM 静态分析时无法提供 default export。\n\n处理:\n- 将 metaFileUploadShared.js 改为 ESM named exports + default export,保留同一组 helper。\n- 移除 ESM source 下不可用的 require(\"path\"),改为顶层 import path。\n- Electron 编译仍会把该文件输出成 CommonJS,现有运行时 require() 和大文件上传测试继续可用。\n- 补齐 GigSquareService.outputType 类型,解决完整 npm run build 先行暴露的 renderer 类型错误。\n\n验证:\n- 先用 npx vite build 复现了原始 Rollup 错误。\n- 修复后 npm run build 通过。\n- npm run compile:electron 通过。\n- npm run lint 通过。\n- git diff --check 通过。\n- node --test tests/serviceDeliveryArtifacts.test.mjs tests/metabotUploadLargefile.test.mjs 通过。\n- npx tsx --test tests/gigSquareServiceCard.test.tsx tests/gigSquareMyServicesModal.test.tsx 通过。","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}