You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With some setups (especially the ones making use of Yarn Workspaces), it is fairly common to use Webpack to apply some loaders to files located in node_modules (like a local package, or a module that needs to go through Babel, etc), and also watch changes happening in those files.
The problem with Webpack 5 is snapshot.managedPaths/cache.managedPaths only accepts an array of string representing a list of folders that "are not supposed to change" (that's my understanding of the feature).
So now, a solution is to just disable them:
{
snapshot: {
managedPaths: []}
...which I would not recommend at all, as I assume it would introduce some severe performances hits for the cache.
So, it would be great if we could have the following:
What is motivation or use case for adding/changing the behavior?
cf. above.
How should this be implemented in your opinion?
It looks to me that using anymatch on managedPaths would not break anything. I have absolutely no knowledge of Webpack's internals, I may say something really stupid here.
Are you willing to work on this yourself?
If it receives the blessing of an official Webpack member, yes!
Sorry out of scope webpack, we avoid using glob syntax in the config (except edge cases - watching, but it is legacy reasons), you can achieve this on own side, just write own logic in the config file, feel free to feedback
Activity
webpack-bot commentedon Nov 20, 2020
For maintainers only:
alexander-akait commentedon Nov 20, 2020
Sorry out of scope webpack, we avoid using
globsyntax in the config (except edge cases - watching, but it is legacy reasons), you can achieve this on own side, just write own logic in the config file, feel free to feedbackalexander-akait commentedon Nov 20, 2020
Logic for this options can be very complex, so we try to keep it simple as possible and complex solutions we leave it to the developers
sokra commentedon Nov 20, 2020
Wrap the glob within
glob.syncin the config