Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ [ PROBLEM FIX ] - [LIVE SERVER - GO LIVE - NO REFRESH - ADDRESS 127.0.0.1: ] #4

Open
andremalveira opened this issue Nov 25, 2021 · 0 comments
Labels
Astronaut Extension Extension-related questions Correction Bugs Solutions or Corrections

Comments

@andremalveira
Copy link
Owner

andremalveira commented Nov 25, 2021

There is a problem in the extension when trying to use the live-server server at address 127.0.0.1: where it does not refresh the page.

Follow the steps below for a fix:

1° - Access the following directory on your system:

  • Windows %USERPROFILE%.vscode\extensions
  • macOS ~/.vscode/extensions
  • Linux ~/.vscode/extensions

2° - Enter the folder \ritwickdey.liveserver-x.x.x\node_modules\live-server and open the file 'injected.html' in your editor

3° - Paste the following code above if('WebSocket in window')

var lsAst = localStorage.getItem('astronaut_extension_settings'),
sAst = (lsAst) ? JSON.parse(lsAst)['isAstExt'] : false;
isAstExt = (sAst == undefined || sAst === true) ? true : sAst

4° - add !isAstExt && inside if(), as follows:

if (!isAstExt && 'WebSocket' in window)
  • The code should look like this:

 // <![CDATA[ <-- For SVG support

var lsAst = localStorage.getItem('astronaut_extension_settings'),
sAst = (lsAst) ? JSON.parse(lsAst)['isAstExt'] : false;
isAstExt = (sAst == undefined || sAst === true) ? true : sAst

if (!isAstExt && 'WebSocket' in window) {
  • After that save the changes and restart your VsCode

@andremalveira andremalveira added Astronaut Extension Extension-related questions Correction Bugs Solutions or Corrections labels Nov 25, 2021
@andremalveira andremalveira pinned this issue Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Astronaut Extension Extension-related questions Correction Bugs Solutions or Corrections
Projects
None yet
Development

No branches or pull requests

1 participant