Closed vietquocnguyen closed 5 years ago
The index.html
file is copied into the dist
folder, but first undergoes a little processing. That makes the public
folder the directory for all files that will always have a corresponding file with the same name in the dist
directory, independently from what's in the src
directory - just like index.html
.
In src
, the main.js
file is the entry point and only files referenced from this file will ever make it into the final build. Since index.html
always makes it into the final build even when it's not referenced from main.js
, it doesn't belong src
.
Does that make sense?
Closing due to inactivity. Happy to reopen if the question still hasn't been addressed. 🙂
I understand in the docs; it says that the contents of the
public
folder are automatically copied intodist
, with the exception ofindex.html
. Why shouldn't theindex.html
just reside in thesrc
folder?