ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.81k stars 1.29k forks source link

support xhtml index file #497

Open dakyskye opened 5 years ago

dakyskye commented 5 years ago

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

XHTML index file isn't loaded

Expected behavior

XHTML index file should be loaded as well as html one

Environment

Browser:

- [ ] Chrome (desktop) version XX
- [x] Firefox version 68.0b3 (64-bit)
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: 5.6.0
- Platform:  Linux
- Visual Studio Code: 1.34.0; a622c65b2c713c890fcf4fbf07cf34049d5fe758; x64;

Others

JohnLukeBentley commented 1 month ago

To clarify and expand on the problem.

(Firefox is my default browser).

All OK with a .html extended file:

  1. Right click 'DebugDemo\play.html' > "Open with Live Server". (Note .html)
  2. The file is opened at http://127.0.0.1:5500/DebugDemo/play.html
  3. In the browser the page updates when VSC changes are saved, as expected.

Shut down live server by clicking "Port: 5500" on VSC status bar.

Try with a .xhtml extended file:

  1. Right click 'DebugDemo\play.xhtml' > "Open with Live Server". (Note .xhtml)
  2. A browser page opens at http://127.0.0.1:5500/
  3. In the browser click through the folder hierarchy to get to http://127.0.0.1:5500/DebugDemo/play.xhtml
  4. In the browser the page updates when VSC changes are saved, as expected.

The desire is to make .xhtml files behave like .html files and eliminate the third step.

And this doesn't seem to be an issue of whether the base is index or not.