WebHare community

4.22: webpack: (s)css loader much more strict, might not find images anymore

regression
#1

If you see things like

Module build failed (from /opt/wh/whtree/node_modules/mini-css-extract-plugin/dist/loader.js): ModuleNotFoundError: Module not found: Error: Can‘t resolve ‘…/web/img/stars-review-gold.png’ in ‘…’

The path might actually have been incorrect all the time. It seems earlier versions of the loaders were a bit more tolerant and would look for the asset in parent directories too, accepting an actually incorrect path. We’ve recently updated the bundlers in 4.22, and this may now fail.

Double check the path :slight_smile:

0 Likes