node版本:
miniprogram-ci版本: 1.1.6
使用开发者工具可以上传成功,使用miniprogram-ci上传失败
开发者工具本地配置
miniprogram-ci 上传配置
const project = new ci.Project({
appid: appId,
type: "miniProgram",
projectPath: path.resolve(process.cwd(), projectPath),
privateKeyPath: path.resolve(publicPath, keyPath),
ignores: ["node_modules/**/*"],
});
const projectConfig = {
project,
desc: `分支:${branch}; 环境:${env}\n`,
version: version,
qrcodeFormat: "image",
qrcodeOutputDest: common.QROutputPath + buildTag + ".jpg",
setting: {
// es6: true, // 对应于微信开发者工具的 "es6 转 es5"
// es7: true, // 对应于微信开发者工具的 "增强编译"
minify: true, // "上传时压缩所有代码"
},
onProgressUpdate: console.log,
};
使用miniprogram-ci上传失败的错误信息,从错误信息看是因为主包超过2M,但是开发中工具中主包大小没有超过2M(上面有截图)
project.config.json中是否还而外配置了一些ignores规则呢?
{
"miniprogramRoot": "./",
"setting": {
"urlCheck": true,
"es6": false,
"enhance": false,
"postcss": false,
"preloadBackgroundData": false,
"minified": false,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"condition": {
"miniprogram": {
"list": [
// 这里配置了几个页面
]
}
}
}
"preloadBackgroundData": false,