Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feat: reduce build time with cache #406
Feat: reduce build time with cache #406
Changes from 2 commits
514a199
103788c
f4a5ebb
28037f6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm curious on the decision to update the production webpack config here versus updating the default
webpack.prod.config.js
file with similar changes. As is, only consumers who rely oncreateConfig
will benefit from the caching; consumers who rely on the defaultwebpack.prod.config.js
provided by@edx/frontend-build
would not get the added benefit of caching.Ideally, even consumers who don't explicitly define a
webpack.prod.config.js
file should also benefit from the added caching.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.
It's because some MFE's have
webpack.prod.config.js
if I make the change in that file I would have to rewrite that file per MFE. Maybe I could be wrong I'm not sure. For the MFE's that don't have implemented@edx/frontend-build
are a quite different because they use a make file any advise for that?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 repositories that have a custom
webpack.prod.config.js
still rely on the base config defined in@edx/frontend-build
'swebpack.prod.config.js
file here: https://github.com/openedx/frontend-build/blob/master/config/webpack.prod.config.jsFor example, frontend-app-learner-portal-enterprise, doesn't specify a
webpack.prod.config.js
file; instead, it relies on the default Webpack configuration provided by@edx/frontend-build
as shown here:The
createConfig
function used in those customwebpack.prod.config.js
files extend/override thewebpack.prod.config.js
from@edx/frontend-build
. If you change the Webpack configuration file itself,createConfig
would still inherit the change unless consumers explicitly override/replace the updatedcache
configuration you're adding.The benefit being that consumers of
@edx/frontend-build
that don't explicitly usecreateConfig
(like frontend-app-learner-portal-enterprise) would still get the significant performance improvements from thecache
addition.[clarification] What MFEs in Open edX don't rely on
@edx/frontend-build
?@edx/frontend-build
is the standard for Open edX MFE tooling & build scripts. Are you referring to non-MFE repositories that still rely on Webpack?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.
@johnvente Bump on this comment thread 😄 I still feel we should be modifying the base webpack.prod.config.js file, not the
createConfig
function.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.
@johnvente Just wanted to check in with you on this PR comment again. Thanks!