Pattison
Pattison
PD🧩 Plasmo Developers
Created by Pattison on 8/19/2024 in #👟framework
HMR becoming less and less reliable as project size grows
On further investigation it may not be the HMR that I am having a problem with, as from what I can see that has never been working as I always get:
WebSocket connection to 'ws://localhost:1815/' failed:
T @ ui.b851b4e2.js:213
2jjbS @ ui.b851b4e2.js:351
newRequire @ ui.b851b4e2.js:72
(anonymous) @ ui.b851b4e2.js:123
(anonymous) @ ui.b851b4e2.js:146
(anonymous) @ ui.b851b4e2.js:564257
Show 6 more frames
Show less
ui.b851b4e2.js:151 🟠 WARN | [plasmo/parcel-runtime]: Connection to the HMR server is closed for /Users/*/GolandProjects/*/*/.plasmo/static/contents/ui.tsx
WebSocket connection to 'ws://localhost:1815/' failed:
T @ ui.b851b4e2.js:213
2jjbS @ ui.b851b4e2.js:351
newRequire @ ui.b851b4e2.js:72
(anonymous) @ ui.b851b4e2.js:123
(anonymous) @ ui.b851b4e2.js:146
(anonymous) @ ui.b851b4e2.js:564257
Show 6 more frames
Show less
ui.b851b4e2.js:151 🟠 WARN | [plasmo/parcel-runtime]: Connection to the HMR server is closed for /Users/*/GolandProjects/*/*/.plasmo/static/contents/ui.tsx
However what has been working is the saving of a file which then reloads the content script page with those changes. Doing some further testing I am finding that it does work if I save the entry content script file after saving the other files. For example: I save a component file I am using in the content script. This does not reload the web page with the content script however the dev server does repackage. I then save the content script entry file this then forces a reload on the web page for the content script and I do see the changes.
3 replies