@CSA welcome! Cool to hear you’re tinkering with developing Miro plugins.
so… let’s see.. first thing to know is that your index.js is accessed and loaded into the Miro browser/app session at the moment a board is loaded. What that means is, to refresh index.js you must refresh the board (/browser page).
However- if you’re refreshing the page/board and index.js is not updating it is most likely→ that you’re running up against the natural manner by which caching works on the browser - whereby your original cached index.js is what’s continually being accessed/loaded by the browser. The app’s request never reaches back to the server and gets the new index js.
Option A) clear browser cache after each update:
Option B) use ‘Nodemon’ or other build/serve tools will listen to updates on the local file system and restart your server— in so doing it will allow the browser to fetch a new index.js
— if you’re using ngrok: leave ngrok alone — just restart the http-server underneath it. In Your CLI this should be easy enough … (ctrl+c stops the server - then arrow up will retype the http-server start command and then
https://www.npmjs.com/package/nodemon
- either with vanilla http-server or by setting your app as a node ‘express’ server— use the http response header “cache-control: no-cache”
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
D) Glitch: this tool is suuuuper useful for prototyping Miro apps. It automatically handles the listen-to-updates-and -reserve process.
——
hope this solves your issue. DM me if you’re like more support or want to connect with someone passionate about making Miro plugins :)
cheers
max