-
Notifications
You must be signed in to change notification settings - Fork 2
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
Upgrade Webpack from v4 to v5 #3091
Conversation
1f13377
to
cae1936
Compare
I've rebased/retested this branch as there was a conflict in a lock file after some PR's merged. It should be good to go with a review now. |
cae1936
to
308fe5a
Compare
308fe5a
to
a01f856
Compare
@mudassir-hafeez Could you rebase this PR? |
a01f856
to
d1ded4e
Compare
I've retested some pages after the rebase, and it should be good to proceed. |
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.
The PR needs a rebase.
Other than that, The testing looks fine but I think there are a few issues with the generated bundles. Although this has stopped generating header-root bundle but its generating a new one with a random name which is not getting pulled on all the pages. For this I think we should combine all these in the header bundle to reduce confusion.
Also, The generated bundle size is more than what it was on master.
Also, The performance stats of all the pages have reduced by ~10%.
26be88a
to
47eb339
Compare
5f0a8f0
to
5632121
Compare
This PR is rebased now.
I have made changes in this regard and combined assets into one, except those specifically mentioned in the entry for dev/prod config, similar to MITxOnline. And re-verified the generated bundle size for both the Webpack upgrade and master branches locally. The overall chunk size still appears slightly better on the Webpack upgrade branch compared to master. And the performance stats seem slightly equal what I discussed earliar, but yeah it has some fluctuation. |
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.
👍
What are the relevant tickets?
#5077
Description (What does it do?)
This PR upgrades dependencies related to webpack upgrade 5 to support python 3.12.x later.
Screenshots (if appropriate):
Before:

after:

How can this be tested?
docker-compose up
. Your watch container will automatically generate the Webpack bundles for you.How to generate the bundles?
docker-compose up
. Your watch container will automatically generate the Webpack bundles for you.node node_modules/webpack/bin/webpack.js --config webpack.config.prod.js --bail
. This will generate the production bundles for you.report.html
file to compare the differences visually.Performance evalution:
Additional Context
common
bundle along with a new one will automatically get pulled in with an additionalrender_bundle
in the appropriate views.