'GitHub pages not sighting index.html within my dist. folder [duplicate]

So I'm relatively new to frontend development (4 months in) and so far anytime I publish a project to GitHub, my index.html is always directly within the root folder. But I started using bundlers (which are amazing by the way 🙂) and that makes all my web files (including index.html) be within the dist. folder and not the root folder. I have no problems with this when using live server but publishing to GitHub gives me a 404 error. Please how can I get around this?



Solution 1:[1]

GitHub Pages can only serve files from the root or an docs folder. See the GitHub Pages documentation on file sources.

Bundlers generally allow you to specify the name of the outDir or you can add a rename step yourself.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 timmeinerzhagen