Open mp3por opened 2 months ago
Im not sure why i cannot run your extension on windows, but you're clearly not using vite for HMR. Nodemon works by watching files changing and rebuilding the whole thing without hmr.
To use any vite dev feature (including hmr) use vite dev mode.
I have no idea why it doesnt work with existing config in your project but i've managed it to work with some changes. Adjust the vite.config to your needs - i've removed some things just to not debug it faster. Manifest defined by defineManifest is better as it (probably) allows the crx to adjust it automatically (at least web_accessible_resources are autogenerated with crxjs)
If that works for you then lets close this issue @mp3por
https://github.com/JohnBra/vite-web-extension/pull/34
I have no idea what does nowork with fs-extra in your project but i've managed it to work no problem. Adjust the vite.config to your needs - i've removed some things just to not debug it faster
If that works for you then lets close this issue @mp3por
demo.gif
I will check during the weekend and come back to you.
@mp3por and?
@Toumash
I was not able to get the HMR working. When I change my code to look like yours however I get the following issue. This screen keeps flickering. I don't understand enough to debug further.
@Toumash
I was not able to get the HMR working. When I change my code to look like yours however I get the following issue. This screen keeps flickering. I don't understand enough to debug further.
![]()
try it one more time. This is an issue i also have sometimes when swiching branches - restarting the dev server several times helps (and if not remove .vite or node_modules, npm install and run again). It is independent from HMR but something with a server startup.
Build tool
Rollup
Where do you see the problem?
Describe the bug
When I open the PopUp and then make a change in the code base, the pop-up does not reflect that change until I manually refresh the popup by closing and opening it again.
Reproduction
https://github.com/JohnBra/vite-web-extension
Logs
No response
System Info
Severity
annoyance