solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Server-side code doesn't refresh when changed

Open viridia opened this issue 3 years ago • 0 comments

When I make a change to a server-side module, the solid-start server restarts, but doesn't actually load the new code. I have to manually ctrl-c the server process and re-run npm run dev to see the new behavior.

This only appear to affect some modules and not others. Changing code inside of a createServerData$() block does get refreshed as expected. Changing the code of a graphql resolver, on the other hand, does not.

Certain files, when touched, will cause the entire server to refresh. For example:

  • I add a 'console.log('aaa') to a graphql resolver and hit save.
  • Server restarts, but I do not see 'aaa' printed on the terminal.
  • Now, I go to another file that has a createServerData$ in it, and hit save.
  • Server restarts again, only now I see the 'aaa' printed.

In other words, touching certain files causes the whole server to reload.

viridia avatar Nov 17 '22 19:11 viridia