Ah yes, for that you still have to restart n8n and then refresh the browser. The reason for that is that it is not a front-end UI change. It is a change of a node and nodes do only get read once when n8n starts.
That is however only required if you make changes to the parameters. If you make later only code changes in the execute functions, and you have n8n set to run every execution in a new process (default setting, alternative is main mode) then a restart is not required as for each new workflow execution a new process gets started and each process and so the latest code gets read.
Thanks for explanation.
I’ve checked and there is as you described - code changes in execute function works as expected.
Earlier I’ve tried change something in function which is defined in methods.loadOptions but looks like it’s the same behaviour as for parameters - changes are not reflected until I restart n8n - is that correct?
Yes, that is correct. The reason for that is the same as for the parameters. It reads in that information only once on startup and the main process then serves that information.
So really only changes to the execute function will work without restart.
If you create a Trigger-Node and you make changes to the webhook function you also have to restart n8n because also that function gets executed in the main process.
fyi: I personally never run npm run dev. What I do is that I run npm run watch so that the code always rebuilds and in a different terminal run npm run start. So if I made code changes I only have to restart the n8n process and do not have to wait for the whole project to rebuild. So you will be able to iterate much faster.
If I additionally make change to the frontend (so actual UI code, not just node parameters) then I have a third terminal with npm run dev running only in the packages/editor-ui folder.