hyperbrew / bolt-express

A lightning-fast boilerplate for building Adobe Express Addons in Svelte, React or Vue built on Vite + TypeScript + Sass
5 stars 0 forks source link

MacOS HMR Permissions issue #15

Closed hyperbrew-bot closed 1 month ago

hyperbrew-bot commented 1 month ago

Changing the UI location.href is fine in Windows but on Mac I'm getting the following error, and Bolt fails to load:

Screenshot 2024-10-02 at 5 08 04 PM

hyperbrew-bot commented 1 month ago

Tried to revert to static build instead of HMR, but now I'm getting this click refresh alert

Screenshot 2024-10-02 at 5 19 32 PM

hyperbrew-bot commented 1 month ago

So I would need to modify the vite build --watch script to only overwrite the manifest.json the first time, otherwise it'll break hot reloading every time in the future.

Even if I adjusted this, this would make UI development WAY slow compared to HMR, takes like 1.5 seconds instead of instant.

Best Option

Express team allows HMR so we're not overwriting the manifest.json each time and triggering a reload

Other option:

Express Team provides us with a way to trigger panel refresh ourself so we don't have to use the file watcher.

Worst Option

We abandon HMR and just do static rebuilding, not overwriting the manifest.json so it doesn't break hot-reloading requiring the user to manually click the Refresh button

hyperbrew-bot commented 1 month ago

Issue with HMR was trying to redirect to an HTTP when the original URL was HTTPS, apparently not allowed on MacOS.

Now adding a cert and serving HMR over https://localhost seems to work on Mac.

Only downside is you're now required to generate a cert by entering your password

37d815447bdfa9c4b7eec64ed38f33863a4767e1