Sorry, my example was a bit wrong: I'm reading aliases from the filesystem structure, and they are not static in the webpack config file (so I guess `buildDependencies: {config: [__filename]}` can't kick in):
[TRIPLE QUOTE]
I could maybe add `/dirname/theme/**` to buildDependencies as well, but it is also quite aggressive to evict the cache if any of the files are updated.
--- [BLOCK QUOTE].
Actually, I don't ask webpack to know about external things, but only aliases that I explicitly provide as webpack config.
[BLOCK QUOTE].
I totally understand it is a complex problem to solve. I don't really expect it to be solved in the near future and my workaround will be fine. Wanted to document this issue a bit as others might encounter it. I also think the doc could explain better which config changes are supported by webpack caching and which the user should take care of.