3.8.4
Let’s look at the case first:
Case 1
Table of contents:
build
|- wechatgame
|- wechatgame-SDK
build-templates
|- wechatgame
|- test.js
|- wechatgame-SDK
|- test2.js
Package out:
build
|- wechatgame
|- test.js
|- test2.js
|- wechatgame-SDK
|- test.js
|- test2.js
build-templates
|- wechatgame
|- test.js
|- wechatgame-SDK
|- test2.js
Case 2
Table of contents:
build
|- wechatgame
|- wechatgame-SDK
build-templates
|- wechatgame
|- game.json
game.json
The length of it is like this
{
"plugins": {
"MiniGameCommon": {
"version": "latest",
"provider": "wxaed5ace05d92b218",
"contexts": [
{
"type": "isolatedContext"
}
]
}
},
"resizable": true
}
Package out:
build/wechatgame-SDK/game.json
- With complete content
- Content with subpackages
- Also with
build-templates
the insideplugins
andresizable
{
"deviceOrientation": "portrait",
"openDataContext": "openDataContext",
"networkTimeout": {
"request": 5000,
"connectSocket": 5000,
"uploadFile": 5000,
"downloadFile": 500000
},
"plugins": {
"MiniGameCommon": {
"version": "latest",
"provider": "wxaed5ace05d92b218",
"contexts": [
{
"type": "isolatedContext"
}
]
}
},
"resizable": true,
"subpackages": [
{
"name": "xxx",
"root": "subpackages/xxx/"
}
// ...
]
}
build/wechatgame/game.json
- All the information is gone
- It is to delete the original one
game.json
and thenbuild-templates/game.json
copy it.
{
"plugins": {
"MiniGameCommon": {
"version": "latest",
"provider": "wxaed5ace05d92b218",
"contexts": [
{
"type": "isolatedContext"
}
]
}
},
"resizable": true
}
doubt
build-templates
The directory inside is called , why does it work whenwechatgame
I package it ?wechatgame-SDK
- How does this directory name match?
wechatgame
Does it refer towechatgame平台
? Orbuild/wechatgame
does it refer to the output directory? - Why is it that
wechatgame-SDK
when matching ,game.json
the json content is merged, butwechatgame
when matching , the entire file is deleted and replaced?