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.

reloading page after hotreloading css

See original GitHub issue

Do you want to request a feature or report a bug? bug report

What is the current behaviour? When only changing css in the project it first hotreloads the project, then hits a 404 and reloads the page

If the current behaviour is a bug, please provide the steps to reproduce.

  • run npm run dev
  • change only css
  • see it hotreload css
  • instantly followed by the entire page reloading
  • if you got “preserve log” enabled in the console you’ll see there was a 404

What is the expected behaviour? For it to only hotreload css

Please paste the results of preact info here.

Environment Info:

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  Binaries:
    Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
    npm: 6.10.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    preact: ^10.1.0 => 10.1.0
    preact-cli: ^3.0.0-rc.6 => 3.0.0-rc.6
    preact-compat: ^3.19.0 => 3.19.0
    preact-render-to-string: ^5.1.2 => 5.1.2
    preact-router: ^3.1.0 => 3.1.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
prateekbhcommented, Jan 23, 2020

This is coming from --esm. For immediate fix please use ``–no-esm` with watch.

@developit @ForsakenHarmony is it ok if watch work without esm?

2reactions
prateekbhcommented, Jan 13, 2020

Sorry trying to carve time out for this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot Reload only for css? - reactjs - Stack Overflow
In a new create-react-app, hot reloading seems to be taking effect only for css files. In the simple example below, clicking on the...
Read more >
CSS Modules (Gatsby v2) - New css styles not hot reloading ...
When adding a new class to a css module, hot reload does not inject the css module class and no styles are shown....
Read more >
Live Reload Page on Code Change | Hot Reloading - YouTube
Run webpage that you are working on at localhost and reload it automatically whenever you change anything in code.
Read more >
Hot reloading css reloads complete page - Ember.JS
I have a problem with my project setup: changes to .scss files cause a reload of the complete page, instead of only hot...
Read more >
How to Hot Reload Your Web Application - Perficient Blogs
A step-by-step process for hot reloading your web applications (with images)
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