pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[bug]: Webpack hot reload broken

Open Risto-T opened this issue 3 years ago • 4 comments

Describe the bug

Changing e.g. CSS styles will perform a full reload on the page in dev mode.

To reproduce

Steps to reproduce the behavior:

  1. yarn watch
  2. Go to the page
  3. Add background: black; to root element in @magento/venia-ui/lib/components/Header/header.module.css
  4. Page reloads

Expected behavior

Whenever possible Webpack HMR (Hot Module Replacement) should update the page in dev mode without reloading the page.

Possible solutions

Temporary fix is to remove the server config in webpack.config.js that was added in https://github.com/magento/pwa-studio/commit/1977f38305ff6c0e2b23a9da7beb0b2f69758bed.

Please complete the following device information:

  • Device: Windows 11
  • Browser: Chrome
  • Browser Version: 97.0.4692.71

Please let us know what packages this bug is in regards to:

  • [X] venia-concept
  • [ ] venia-ui
  • [ ] pwa-buildpack
  • [ ] peregrine
  • [ ] pwa-devdocs
  • [ ] upward-js
  • [ ] upward-spec
  • [ ] create-pwa

Risto-T avatar Jan 14 '22 11:01 Risto-T

Hi @Risto-T. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Jan 14 '22 11:01 m2-assistant[bot]

@magento export issue to JIRA project PWA as Bug

anthoula avatar Jan 25 '22 17:01 anthoula

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-2530 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Jan 25 '22 17:01 github-jira-sync-bot

Hello! Any progress with this issue? I tried some different things, but the hot reload doesn't work. Maybe any workaround meanwhile the issue is being resolved. Thanks!

sesave avatar Feb 22 '22 19:02 sesave

Updated stylesheet as mentioned in issue description, and found WDS is running hot reloading as expected .

@Risto-T , If We have missed any step kindly let us know.

Below are the screen recordings -

https://github.com/magento/pwa-studio/assets/127731581/04527e6a-2df3-4551-9321-113582dac9de

https://github.com/magento/pwa-studio/assets/127731581/05c8c671-e52e-409b-8b27-be377928ca55

Tarun50745 avatar Jul 24 '23 06:07 Tarun50745

closing the ticket since no updated from last 2 week, please feel free to reopenn in case issue still persist

glo42707 avatar Aug 04 '23 11:08 glo42707