-
Notifications
You must be signed in to change notification settings - Fork 0
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
支持构建独立分包吗 #1
Comments
支持小程序的独立分包,runtime.js和common.js 这两个文件是公共代码,减少代码体积 |
独立分包不能这样复用吧,runtime跟common应该算主包的代码,独立分包不能require主包代码
…------------------ 原始邮件 ------------------
发件人: WangZhenHao ***@***.***>
发送时间: 2024年9月15日 09:28
收件人: WangZhenHao/wxmini-plugin-webpack ***@***.***>
抄送: liuwei ***@***.***>, Author ***@***.***>
主题: Re: [WangZhenHao/wxmini-plugin-webpack] 支持构建独立分包吗 (Issue #1)
支持小程序的独立分包,runtime.js和common.js 这两个文件是公共代码,减少代码体积
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
common.js的代码生成规则是:模块引用次数大于3而且 大于1kb的时候,提到common.js。 如果分包的页面的js,引入了三次以上,而且大于1kb,就会提取到common.js. 分包才会自动引入common.js文件 如果你的分包代码,没有引入三次以上,而且大于1kb,是不会放到common.js里面的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
构建独立分包应该要把 runtime 拆分成多个吧,我看文档里面的截图只有一个,冒昧的请假一下
The text was updated successfully, but these errors were encountered: