QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.84k stars 1.31k forks source link

[🐞] dev server not reflecting changes after save #3160

Closed itsthesteve closed 1 year ago

itsthesteve commented 1 year ago

Which component is affected?

Qwik Rollup / Vite plugin

Describe the bug

Changes made to a routes/subroute/index.tsx file are not reflected after saving in dev mode, and the dev server must be restarted.

Reproduction

https://github.com/itsthesteve/qwik-refresh-bug

Steps to reproduce

Clone the reproduction repo at https://github.com/itsthesteve/qwik-refresh-bug

const onSave$ = $((data: any) => {
    - console.log("parent saving", data);
    + console.log("!! Called Save from parent", data);
});

Click the button again, notice the console log is stale and the sources tab doesn't show the change.

The page will refresh, but changes are not reflected in the console or sources tab.

System Info

System:
    OS: macOS 12.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 135.18 MB / 16.00 GB
    Shell: 5.6.2 - /usr/local/bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    npm: 9.4.2 - ~/.nvm/versions/node/v18.14.0/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Browsers:
    Brave Browser: 110.1.48.171
    Chrome: 110.0.5481.100
    Firefox: 109.0.1
    Safari: 16.0
  npmPackages:
    @builder.io/qwik: 0.19.2 => 0.19.2
    @builder.io/qwik-city: 0.4.0 => 0.4.0
    undici: 5.20.0 => 5.20.0
    vite: 4.1.4 => 4.1.4

Additional Information

In my project where I noticed this happening, some changes to a component template were also not reflecting, but couldn't repro here as the other project is a bit bigger, so I'm not sure where to try and poke.

zanettin commented 1 year ago

Hi @itsthesteve 👋 thanks for mentioning this issue 🙏 looks for me like a duplicate of https://github.com/BuilderIO/qwik/issues/1901, or am i wrong? thanks once again!

itsthesteve commented 1 year ago

Thanks @zanettin, it appears so! I see the full-reload in the WS as well.

I added a small store and indeed just changing the console.log value in the callback does revert the store values. It's strange to me that even with a full reload, the changes aren't applied to the QRL specifically. Feel free to close this as it appears to be a dupe.

manucorporat commented 1 year ago

This is a new issue though! regression! got a fix alreafy!