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.78k stars 1.27k forks source link

HTML files resources path (eg. images) on live-server extention is different from the file system path to the same resource. #1066

Open Guyr989-zz opened 4 years ago

Guyr989-zz commented 4 years ago

Issue Type: Bug

Sometimes relative paths on html pages to a resources will work fine(eg. images) on live-server but when I check the same html on the file system I get an error for a wrong path for that resource.

1.Create several levels of directories( 3 or above ) 2.Add an image in the most inner directory 3.Add an html file in the root directory 4.Add a path to that file via vscode helper window(use tab and Enter to navigate the helper window)

  1. open the file via live-server 6.compare to the same file on the file-system

Extension version: 5.6.1 VS Code version: Code 1.49.0 (e790b931385d72cf5669fcefc51cdf65990efa5d, 2020-09-10T13:22:08.892Z) OS version: Windows_NT x64 10.0.19041

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 2304)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.79GB (6.19GB free)| |Process Argv|--crash-reporter-id e67e9e7c-79ee-4c1d-bace-a3e70f0d3ef0| |Screen Reader|no| |VM|0%|
phoenixeliot commented 2 years ago

@Guyr989-zz What are some example paths produced by this, vs what they should be?

BUZZARDGTA commented 1 year ago

this worked for me:

instead of this link: http://127.0.0.1:5500/ uses that: http://localhost:5500/