-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix: modules duplicated in multiple chunks now are always loaded by runtime.js #7856
Conversation
Co-Authored-By: Sébastien Chopin <seb@orion.sh>
Co-Authored-By: Sébastien Chopin <seb@orion.sh>
Co-Authored-By: Sébastien Chopin <seb@orion.sh>
Co-Authored-By: Sébastien Chopin <seb@orion.sh>
Codecov Report
@@ Coverage Diff @@
## dev #7856 +/- ##
==========================================
+ Coverage 68.88% 68.89% +0.01%
==========================================
Files 90 90
Lines 3840 3839 -1
Branches 1038 1037 -1
==========================================
Hits 2645 2645
Misses 971 971
+ Partials 224 223 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the only change removing m.chunks.length === 1
?
Yes |
This plugin is cloned from vue, so would you mind opening an issue there ? https://github.com/vuejs/vue/blob/4dec3b52c9b71f816e6b86d42ea53e9f2e559646/src/server/webpack-plugin/client.js#L40 I think introducing multiple chunks may need more analyse and data processing, I'll take a deep look about the change. |
ok, thanks |
BTW, can you please provide me a minimal reproduciable repo about this issue ? |
|
} | ||
|
||
// Find all asset modules associated with the same chunk | ||
assetModules.forEach((m) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maunier Any reason not to use for..of
here, to keep consistency with the rest of the code?
Hi @maunier Testing repro (https://github.com/maunier/test-vue-ssr.git) with fresh lock-file seems everything is right. chunks:
"async": [
"020e051.js", <-- pages/c2
"71a0567.js", <-- pages/c1
"eebef40.js"
],
{
"entry": "server.js",
"files": {
"3.js": "3.js",
"pages/c1.js": "pages/c1.js",
"pages/c2.js": "pages/c2.js",
"server.js": "server.js"
},
"maps": {
"3.js": "3.js.map",
"pages/c1.js": "pages/c1.js.map",
"pages/c2.js": "pages/c2.js.map",
"server.js": "server.js.map"
}
} Also pages are preloaded when locally testing. |
Types of changes
Description
Here is the issue: vuejs/vue#11560
Sorry I have maken the issue at wrong place.
Checklist: