underground-works / clockwork-app

Clockwork - php dev tools in your browser - client application
https://underground.works/clockwork
MIT License
69 stars 11 forks source link

How to enable hot reload? #116

Open fedorovsergey opened 1 year ago

fedorovsergey commented 1 year ago

Hello! Is there a way to not npm build -> browser://extensions/ -> reload -> F12 close-open on every change? May be you use some kind of automatization? It would be great if you give me a piece of advice! Thanks)

itsgoingd commented 1 year ago

Hey, unfortunately I don't know about a way to make hot-reload work with extensions. I usually develop Clockwork as a standalone web app using npm run serve and test a browser build every now and then.

fedorovsergey commented 1 year ago

Thank you for you answer! When I start it in your way, I get an error, "Access to fetch at 'https://myhost.org/...../latest' from origin 'http://127.0.0.1:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request." My site is closed by authorization. Anyway I have to add Access-Control headers from server side, right?

itsgoingd commented 1 year ago

Yeah, your backend will need to send an appropriate Access-Control headers to allow ajax requests from localhost.