We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vuecli 生成的项目自带 webpack5 生成的文件会统一加上 defer 标识,qiankun-webpack-plugin 对此标识过滤了。调试的时候还需小改下 webpack-plugin 的代码
defer
qiankun-webpack-plugin
webpack-plugin
带有 defer 标识的 script 在 loadEntry 方法中会先执行 .then() 回调在执行 script.onload 导致 qiankun 获取不到应用生命周期
script
loadEntry
.then()
script.onload
qiankun
webpack5 的 output 设置成 libraryTarget 或者 library.type 设置成 window| umd 都有可能导致 代码内的 export 获取不到,导致 qiankun 获取不到应用生命周期
webpack5
output
libraryTarget
library.type
window| umd
仓库地址
vue3-main
子应用
app.js
export
多试几次,有时候加载成功,有时候加载失败
The text was updated successfully, but these errors were encountered:
@qiYuei next 分支拉最新代码再看下
Sorry, something went wrong.
我一会验证下
Successfully merging a pull request may close this issue.
问题描述
Vuecli 生成的项目自带 webpack5 生成的文件会统一加上
defer
标识,qiankun-webpack-plugin
对此标识过滤了。调试的时候还需小改下webpack-plugin
的代码带有
defer
标识的script
在loadEntry
方法中会先执行.then()
回调在执行script.onload
导致qiankun
获取不到应用生命周期webpack5
的output
设置成libraryTarget
或者library.type
设置成window| umd
都有可能导致 代码内的 export 获取不到,导致qiankun
获取不到应用生命周期现象
最小复现库
仓库地址
步骤
vue3-main
子应用
app.js
断点可以看是否获取到export
内容多试几次,有时候加载成功,有时候加载失败
The text was updated successfully, but these errors were encountered: