Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
fengyepiaoling opened this issue Jan 12, 2023 · 3 comments
Labels

Comments

@fengyepiaoling
Copy link

⌨️

  • Would you like to work on a fix?

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
Copy link
Author

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

@fengyepiaoling
Copy link
Author

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

@wsyks
Copy link

wsyks commented Feb 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants