Plugin development and Hot reload

Hello all!

First thanks for that amazing software and creating the plugin API, really exciting stuff.

I started diving into plugin development, so far so good, everything seems working fine on prerelease 1.4.11.

However, I noticed I had to manually reload the application (while Joplin development tools opened, click inside, and CTRL-R) to see my plugin changes.

Any idea or system on how to automate that into a hot-reload system similar to what we are used to in web development with tools like webpack?

Many thanks :slight_smile:

1 Like

There's some info to hot reload the main app there:

I guess you could add your plugin files to the list of watched files?

Ok, thanks for the suggestion, I took a look into it, seems the process right now still requires you to quit the app (CTRL-Q), I guess the best way so far is to continue manually CTRL-R the app after a change has been made

Keep in mind that the plugin system is not implemented with live reload in mind, so even if it mostly works there might be some strange issues or left-over state. Basically if something doesn't work as expected, quit and start the app again.

1 Like

Ok thanks for the precision, right now the CTRL-R seems to work fine, but I guess when I will go deeper, it might need a cleaner reload.

I don't know much about watchman
I got to know we can use nodemon to run it smoothly
As given in the documentation of nodemon
There is a command in it
nodemon -x "python" ./
Which does the following

  • Check for changes in
  • whenever a change is detected run the command python ./
    similarly nodemon -x "npm run dist" -w ./index.ts
  • builds the code on change of index.ts