sergey icon indicating copy to clipboard operation
sergey copied to clipboard

Remove .html from the URL in npm run dev

Open alvinkonda opened this issue 4 years ago • 2 comments

Is any preferred way to remove the .html file extension from the url when using the npm run dev command?

alvinkonda avatar Mar 10 '20 11:03 alvinkonda

You can adding a directory before the html document and rename your html-file to index.html. Examples: https://example.com/archive(/index.html) https://example.com/about(/index.html)

MyZeD avatar May 08 '20 09:05 MyZeD

That's rather tedious, instead the build process could automatically rename the file for us and set the content type to HTML so it opens up without the extension in the browser.

CC @trys

Aditya94A avatar May 29 '20 07:05 Aditya94A