question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

css mirroring fail with static files in sub-directory

See original GitHub issue

Environment (please complete the following information):

  • OS (e.g., Windows 10):
  • Extension version (e.g., 1.2.3):

Describe the bug:

If I put my html, css, and js in a subdirectory of my project folder, updating css doesn’t work. I get the following error: image

Repro steps:

  1. Create a project containing a single folder titled ‘public’
  2. Add index.html, script.js, and style.css to the public folder
  3. link the script and css files in the html, and include some css to edit later via mirroring
  4. create an edge launch configuration with the property "webRoot": "${workspaceFolder}/public" and a url port of 5500 (for the live server default)
  5. configure live server to vend only the public folder and start it
  6. launch edge
  7. open dev tools
  8. uncheck a property in one of your rules

Expected behavior:

I expected the css property to be updated in my css file.

Additional context:

I notice if I leave everything in the project root, and remove the public extension on the webRoot property everything just works.

Alternatively, If I:

  • remove the public extension from webRoot and add it to the launch url
  • add a base tag to html to load js and css correctly
  • serve the project home directory instead of public css is editable. then everything also works, but now I have ‘public’ in my urls.

basically, it seems like the paths have to match. If the browser fetches /public/style.css then it is okay to have style.css in the public sub-directory.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mliao95commented, Mar 10, 2022

Ah I see the issue now. We have already fixed this issue, but won’t be public until our next release. We aim to get the next version out sometime near the end of next week. Thanks for your patience.

0reactions
mliao95commented, Mar 28, 2022

New version released. Closing issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set Django to read static files store in ...
You could do it by putting the images folder explicitly in the settings like: STATICFILES_DIRS = ( os.path.join(PROJECT_ROOT, '.
Read more >
nginx can only serve static files from subdirectories, not the ...
I'm trying to place my style.css in the same directory as the index.html (which loads fine), but it throws a 500 error when...
Read more >
Flask by example 3 (Templating, Authentiation and Static assets)
We now have a new folder templates that contains our html files and a static folder and it's subfolders which holds our static...
Read more >
More detailed passthrough copy options #214
I'm trying to use manual passthrough copy to copy some files over to my dist directory - but the outcome is not what...
Read more >
Redirecting and Remapping with mod_rewrite
This document supplements the mod_rewrite reference documentation. It describes how you can use mod_rewrite to redirect and remap request.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found