Search code examples
webpackcss-loaderwebpack-file-loader

Webpack images from css file after build doesn't copy


When I run npm run build the images from .html files are loaded / copied. But the ones from the css file doesn't get copied in the final dist/assets/img folder.

And if I use copy-webpack-plugin, everything is ok assets folder is copied. But I cache the images so I will have duplicates with the ones in .html files.

Here you have my config files.


Solution

  • I figured out. Got the solution from here.

    Here is the previous gist that i modified, only for config and prod files.