Open Birowsky opened 7 years ago
It is just the way webpack works.
It takes some javascript entry and output it to some directory.
Normally output directory wont contain the html entry file. In order to "copy" the html to the same directory as the Javascript, you need to require('file?name=index.html!./index.html');
This happens because of the file-loader, which takes a file and copy it to the webpack output folder: https://github.com/webpack-contrib/file-loader
Note that this is a recommendation. You could just write your index.html somewhere else, and move the files together before bundling.
From the docs:
What does "copied to your output" mean exactly?