Webpack project with mutliple html / js / css files

Viewed 189

I think that I've got how Webpack works. My problem is: Most tutorials/examples are based on a single index.html. So, how would I organize my webpack.config.js and directory structure for multiple pages?

Let's assume that I need the following things:

  1. index.html with a css and js file
  2. dashboard.html with a css and js file
  3. profile.html with a css and js file

And here is what I don't get:

  1. How would you structure your src and dist folder?
  2. How do I have to configure Webpack? Probably with HtmlWebpackPlugin(?)
  3. Is a single index.js file enough as entry point / How does one structure the index.js file / How do ES6 projects look in general?

A sample project would help a lot. A project with more than just an example index.html file.

Have a good day! :)

2 Answers
Related