loadSubpackage分包加载JS报错?
bin/subpack/game1.js:
TypeError: Cannot read property ‘XXXX’ of undefined
XXXX在主包定义了window.XXXX,但加载分包时报错了。这是哪里配置错了吗?
├── subpack │ └── game.js │ └── game1.js │ └── game2.js
“subpackages”: [
{
“name”: “game”,
“root”: “bin/subpack”
}
],
有两个分包,在打印分包加载完成之前就报错了