fix-dist.bat 721 B

12345678910111213141516
  1. @echo off
  2. chcp 65001 >nul
  3. set DIST=%~dp0dist\dev\mp-weixin
  4. if exist "%DIST%\custom-tab-bar\index.vue" (
  5. del /f /q "%DIST%\custom-tab-bar\index.vue"
  6. echo ✓ 已删除 custom-tab-bar/index.vue
  7. ) else (
  8. echo - 没有找到 index.vue,无需清理
  9. )
  10. powershell -Command "$c=Get-Content '%DIST%\project.config.json' -Raw -ErrorAction SilentlyContinue | ConvertFrom-Json; if($c -and !$c.setting.lazyCodeLoading){$c.setting.lazyCodeLoading='requiredComponents';$c | ConvertTo-Json -Depth 10 | Set-Content '%DIST%\project.config.json'; Write-Host '✓ 已设置 lazyCodeLoading';}else{Write-Host '- lazyCodeLoading 无需设置'}"
  11. echo.
  12. echo 修复完成,请在微信开发者工具中重新导入项目
  13. pause