question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support exclude rules config for cache.buildDependencies

See original GitHub issue

Feature 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:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hiyukicommented, Mar 3, 2022

Ok, actually I can pass a load config to lilconfig to read package.json by fs.readFile instead of require to avoid this problem. Thanks for your replies. @vankop @alexander-akait

0reactions
starmoomscommented, Mar 18, 2022

But, it will take more than 30s to re resolve build dependencies…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache - webpack
It's recommended to set cache.buildDependencies.config: [__filename] in your webpack configuration to get the latest configuration and all dependencies.
Read more >
<w> [webpack.cache.PackFileCacheStrategy] Caching failed ...
[webpack.cache.PackFileCacheStrategy] Capturing build dependencies... (E:\React Projects\testapp\next.config.js, E:\React Projects\testapp\node_modules
Read more >
Configuration cache - Gradle User Manual
The configuration cache does not support all core Gradle plugins and and features. Full support is a work in progress. Your build and...
Read more >
Webpack - exclude single folder of node_modules from caching
This is a new configuration option cache.buildDependencies, which allows specifying code dependencies of the build process.
Read more >
Artifact Dependencies - TeamCity On-Premises - JetBrains
The Build Configuration Settings | Dependencies | Artifact Dependencies ... Watch our video guide on how to work with artifact rules.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found