3

When running "npm run build" to build a project in Webpack, html files are not copied into the dist directory.

Based off the following Stack Overflow thread, it appears this behaviour is normal and there are several workarounds to automate this process as outlined in the accepted answer.

Webpack.config how to just copy the index.html to the dist folder

However, my question is why Webpack doesn't bundle html files (along with JavaScript and CSS files) by design since it seems like such a trivial feature, which I expected it to accomplish as a Webpack novice.

ptk
  • 6,835
  • 14
  • 45
  • 91
  • I just read the [Getting started](https://webpack.js.org/guides/getting-started/) and connexo is right - webpack bundles source code and assets, not html files which they call distribution code. – Adelin Jan 12 '18 at 10:58
  • 1
    Thanks for answering. The reason why I asked this question here is because I thought it was possible there may be a really obvious answer that I haven't been able to find online. As you can probably tell from my question I'm very new to webpack. – ptk Jan 12 '18 at 11:01

0 Answers0