Bladeren bron

fix: 修复小程序体验版发布使用正确的 production 构建模式

- 体验版应使用 production 模式而非 development 模式
- 修复 getBuildConfig 逻辑,只有开发版使用 development
- 更新注释说明体验版=生产环境

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 3 weken geleden
bovenliggende
commit
de15985aa7
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4 4
      .claude/skills/weapp-publish/scripts/publish-weapp.js

+ 4 - 4
.claude/skills/weapp-publish/scripts/publish-weapp.js

@@ -33,15 +33,15 @@ const MINI_CONFIGS = {
  *
  * 说明:
  * - dev (开发版预览): 使用 development 模式,跳过构建(使用 watch 模式的输出)
- * - experience (体验版): 使用 development 模式,自动构建
+ * - experience (体验版): 使用 production 模式,自动构建(体验版=生产环境)
  * - production (正式版): 使用 production 模式,自动构建
  *
  * 目录结构:dist/weapp/{mode}/
  */
 function getBuildConfig(config, action) {
-  // 体验版和开发版都使用 development 模式(连接开发环境)
-  // 只有正式版使用 production 模式
-  const mode = (action === 'experience' || action === 'dev') ? 'development' : 'production'
+  // 只有开发版使用 development 模式
+  // 体验版和正式版都使用 production 模式
+  const mode = action === 'dev' ? 'development' : 'production'
 
   // 根据模式设置对应的 NODE_ENV
   // 这样构建输出目录和上传目录就能匹配了