Webpack-multipage (multiple entry points) starter template for creating a multipage static html website.
- Create a folder in the src directory with the name
page-<name>and its respective<name>.js,<name>.cssand<name>.htmlfiles. Make sure that you use the same<name>in all those three places. - Go to
bundler/webpack.common.config.jsand add the<name>as a string to thehtmlPageNamesarray. - Re-run the dev server using:
npm run dev. - Check out that entry point using
<local Hosting Address>/<name>.html
- Delete the respective folder
- Remove that
<name>from thehtmlPagesArray. - Re-run the server -
npm run dev. - That entry point should no longer be accessible.
Inspired By - https://github.com/ivarprudnikov/webpack-static-html-pages:
- Splitchunks for common node_modules.
- An easy function that loops through the
htmlPageNamesarray to create HTMl pages easily.