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

Content-script HMR works only for css #254

Closed
1 of 2 tasks
vovsemenv opened this issue Mar 19, 2022 · 5 comments
Closed
1 of 2 tasks

Content-script HMR works only for css #254

vovsemenv opened this issue Mar 19, 2022 · 5 comments
Labels
awaiting-feedback Further information is requested could not reproduce This doesn't seem right

Comments

@vovsemenv
Copy link

Build tool

Vite

Where do you see the problem?

  • In the browser
  • In the terminal

Describe the bug

Content-script HMR works only for css

Reproduction

guide fro https://dev.to/jacksteamdev/real-vite-react-hmr-in-chrome-extension-content-scripts-40di#add-a-content-script

Logs

No response

System Info

last chrome

Severity

annoyance

@vovsemenv
Copy link
Author

@jacksteamdev bug or feature?

@jacksteamdev
Copy link
Contributor

jacksteamdev commented Mar 21, 2022

@vovsemenv The article encourages the reader to try JS HMR, but doesn't specify what changes to make.

Please provide a detailed description of how JS HMR doesn't work for you. 🙏

@jacksteamdev jacksteamdev added need more info could not reproduce This doesn't seem right awaiting-feedback Further information is requested and removed need more info labels Mar 21, 2022
@aptash
Copy link

aptash commented Mar 22, 2022

In my case, first I have to remove the "dist" folder to see the changes. HMR doesn't work even with CSS changes.

Upd: I tried to do all the steps from your article as is. HMR doesn't work at all.
For example, I did changes and saved them. In the terminal I see:

18:13:14 [vite] hmr update /src/App.jsx
18:13:14 [crx] files start ../../../../../dist
18:13:15 [crx] files ready in 1037ms

But the files in "dist/scr/" folder don't change.
I'm on Windows 10.

@jacksteamdev
Copy link
Contributor

jacksteamdev commented Mar 23, 2022

I'm on Windows 10.

@aptash Since HMR doesn't work at all in your case, this is probably a different issue. Probably related to #137, but could you please open a new issue specific to HMR in Windows? I don't want your use case lost in this issue.

18:13:14 [crx] files start ../../../../../dist

../../../../../dist makes me think that path resolution isn't working for Windows. Is a dist folder created five folders up?

@jacksteamdev
Copy link
Contributor

@vovsemenv Closing b/c issue doesn't provide a minimal repro or even system info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Further information is requested could not reproduce This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants