Support exclude rules config for cache.buildDependencies
See original GitHub issueFeature request
What is the expected behavior?
Exclude some files/directories from the buildDependencies collected by FileSystemInfo.resolveBuildDependencies()
What is motivation or use case for adding/changing the behavior?
Sometimes some loader reads config from projectRoot/package.json
by require()
(for example postcss-load-config -> lilconfig
) in this case projectRoot/package.json
will be collected as a buildDependency by FileSystemInfo.resolveBuildDependencies()
, and any change of projectRoot/package.json
(such as project dependency update) will cause the invalidation of the full filesystem cache.
Actually I have not written any postcss config in my package.json file, so I want a exclude rules config to remove projectRoot/package.json
from the buildDependencies.
How should this be implemented in your opinion? Support exclude rules config for cache.buildDependencies
Are you willing to work on this yourself? yes
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Ok, actually I can pass a load config to
lilconfig
to readpackage.json
byfs.readFile
instead ofrequire
to avoid this problem. Thanks for your replies. @vankop @alexander-akaitBut, it will take more than
30s
to re resolve build dependencies…