cocos creator 3.8.2 命令行发布 bundle
如果用 stage=bundle ,bundle里面有代码打包不进去
tmx文件也打不进去
而且引用了脚本的资源都不会打包进去,代码是在对应的bundle里面
"%creator_path% --project xxx --build "stage=bundle;configPath=%build_config_path%"
{
"buildTaskIds": [
"1713876745831"
],
"dest": "project://build/build-bundle",
"id": "buildBundle",
"bundleConfigs": [
{
"root": "db://assets/map",
"name": "map",
"output": true
}
],
"taskName": "build bundle db://assets/map"
}
如果不用stage=bundle ,使用 3.8.1 里面只构建bundle的配置 构建单个bundle都会把所有的bundle构建一遍
"%creator_path% --project xxx --build "configPath=%build_config_path%"
{
"name": "Test",
"server": "",
"platform": "web-desktop",
"buildPath": "project://build",
"debug": false,
"md5Cache": false,
"skipCompressTexture": false,
"sourceMaps": false,
"polyfills": {
"asyncFunctions": true
},
"experimentalEraseModules": false,
"startSceneAssetBundle": false,
"bundleConfigs": [
{
"root": "db://assets/map",
"name": "map",
"output": true
}
],
"useBuiltinServer": false,
"mainBundleIsRemote": false,
"mainBundleCompressionType": "merge_dep",
"useSplashScreen": false,
"bundleCommonChunk": false,
"packAutoAtlas": true,
"startScene": "f79394cc-13f9-40f4-ad3d-89313070c9a0",
"outputName": "bundles",
"taskName": "web-desktop",
"scenes": [
{
"url": "db://assets/scene-2d.scene",
"uuid": "f79394cc-13f9-40f4-ad3d-89313070c9a0"
}
],
"packages": {
"engine": {
"cleanupImageCache": "inheritProjectSetting",
"__version__": "1.0.8"
},
"adsense-h5g-plugin": {
"enableAdsense": false,
"enableTestAd": false,
"AFPHostPropertyCode": "ca-host-pub-5396158963872751",
"AFPHostDomain": "douyougame.com",
"otherAFPHostPropertyCode": "",
"otherAFPDomain": "",
"__version__": "1.0.1"
},
"web-desktop": {
"resolution": {
"designWidth": 1280,
"designHeight": 960
},
"cullEngineAsmJsModule": false,
"__version__": "1.0.1"
},
"cocos-service": {
"configID": "379ac1",
"services": [],
"__version__": "3.0.7"
}
},
"__version__": "1.3.7",
"buildMode": "bundle",
}
就算buildMode 改成 stage 也会报Invalid bundle options