buildDependencies not working as expected.
See original GitHub issueBug report
What is the current behavior?
See pull request here https://github.com/webpack/webpack.js.org/pull/4311
I’m require
ing a file in webpack configuration, but change to require
ed file doesn’t invalidate the cache as per https://github.com/webpack/changelog-v5/blob/master/guides/persistent-caching.md#build-dependencies.
Here’s the related configuration for cache
:
cache: {
type: 'filesystem',
buildDependencies: {
config: [__filename],
},
cacheDirectory: path.resolve(__dirname, '.cache/webpack')
},
If the current behavior is a bug, please provide the steps to reproduce.
- clone code from
https://github.com/webpack/webpack.js.org/pull/4311
- run
yarn
thenyarn fetch:supporters
andyarn start
- open http://localhost:3000/api/cli/#configuration-options
- change
-
to*
here https://github.com/webpack/webpack.js.org/pull/4311/files#diff-53da17d70729ef08abbe0bc80f4cf2a701f0447084bf69be87873f5a064512e4R13 ctrl-c
twice to stop dev server and runyarn start
again- refresh
http://localhost:3000/api/cli/#configuration-options
, you can find-
still there while i was expecting*
.
What is the expected behavior?
Right now I have to run rm -rf .cache/webpack
to clean up the cache.
Other relevant information: webpack version: 5.10.1 Node.js version: 14.15.0 Operating System: macOS Big Sur Additional tools:
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Suppress very long webpack/Babel warning - Stack Overflow
The gist of it seems to be that Webpack is trying to resolve this: @babel/helper-compilation-targets/lib/filter-items. And, it expects it to ...
Read more >Issue #12: Enable build dependency resolution - fedmod - Pagure.io
Build dependency resolution is currently disabled because it fails for grep , as the solver currently expects to be able to find all...
Read more >How to Troubleshoot a Failed Easybuild Compilation
Step 1: Build Dependencies Separately, in Sequence. The first thing to try, is to build each dependency separately, in the sequence that they ......
Read more >pip subprocess to install build dependencies did not run ... - You.com
So pip is trying to compile it from source. But as the error message says, VC 6.0 is not supported by this module....
Read more >ProjectDependency added by Configuration ...
withDependencies has no buildDependencies ... at all but only throw syntax errors, it is hard to guess what your actual problem is or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve tested the code with the latest webpack and it works as expected now, I think the warning regarding
Can't resolve 'webpack.dev.js'
could be fixed in anotherwebpack-cli
release, hence I’m closing this issue.Yep, fixed