Collecting un-linked assets with Webpack?

54 Views Asked by At

I have a directory of assets - favicon, sitemap.xml, etc - which are not referenced by my application, but which should be collected during my webpack build. This is trivial to do with other build tools like Grunt or Gulp, but I'm absolutely stumped on how to get Webpack to do this.

1

There are 1 best solutions below

0
On

One way to sort of solve this is to use copy-loader. Keep in mind that Webpack is primarily a module bundler so this use case goes beyond it. It's more than fine to use Webpack with some other tools that are better suited for copying files.