alibaba / rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Other
7.99k stars 627 forks source link

[BUG] <rax微信小程序开启分包本地启动后>修改任意文件,在微信开发者工具中报热更新错误。 #2400

Open fengyepiaoling opened 1 year ago

fengyepiaoling commented 1 year ago

⌨️

Where is the bug from?

Rax Core

Minimal code and steps to reproduce the bug

错误内容: TypeError: Cannot read property 'webpackHotUpdatescf' of undefined

Current and expected behavior

希望解决错误。

Environment

微信开发者工具

build.json

module.exports = { targets: ['web', 'wechat-miniprogram'], // targets: ['wechat-miniprogram'], webpack5: true, plugins: ['build-plugin-fusion-mobile', './build.plugin.js'], inlineStyle: false, 'wechat-miniprogram': { nativeConfig: { appid: 'wx8407a97a7b55d6cd', setting: { ignoreDevUnusedFiles: false, ignoreUploadUnusedFiles: false, }, }, subPackages: true, }, web: { mpa: true, tabbar: true, }, };

Possible solution

No response

Additional context

No response

fengyepiaoling commented 1 year ago

只有跨包跳转时才会报错TypeError: Cannot read property 'webpackHotUpdatescf' of undefined。即主包跳转分包页面时报错

fengyepiaoling commented 1 year ago

已解决,如果小程序分包模式,通过禁用热更新的方法可以解决以上错误。 // 禁用热更新模块启动 yarn start:local -- --disable-reload

wsyks commented 1 year ago

去掉热更新也还是会报错TypeError: Cannot read property 'webpackHotUpdatescf' of undefined