[Webpack 5] Adding new enableBuildCache() method for Webpack 5 persistent caching #884
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.
Hi!
This is a very simple feature, but it can also easily be improperly used. It is part of #880. See some comments about it from @Lyrkan from #645:
The trick, for us, is to:
A) Make sure we are doing everything as correctly as we can. For example, I assume that WE don't need to include
.babelrc
orpostcss.config.js
, but I actually don't know that for sure. Should we also potentially be adding Encore itself to the build dependencies?B) Good communication in the documentation above the method and in the (eventual) recipe where we include this in the user's webpack.config.js file
TODO
buildDependencies
- other thanconfig
, this is not documented anywhere).2) Check into Stimulus: I'm curious ifshould be solved by linked changes in updating stimulus-bridge plugin to work with proposed new loader #888controllers.json
will need to be added to the build dependencies. I'm also curious if the UX vendor libraries will need to be in the build dependencies, as these do not follow the normal versioning (i.e. their directories innode_modules/
can change without a change toyarn.lock
orpackage.json
)Cheers!