You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this function we the module runner is created by instantiating a new ModuleRunner instance.
The classes constructor is pretty unlikely to throw, but I don't think that that's not impossible (especially when developing our plugin) and if that happens no error is presented anywhere and we simply end up with a non instantiated module runner (which might be quite surprising during debugging).
I think it would be much nicer to have some proper error handling here and on the dev server side of things even kill the whole process in case some error was actually thrown (since if a module runner is not present the whole environment is not actually usable).
Additionally we have this code to make sure that we don't create multiple module runners per environment:
But again this error is practically suppressed, I'd imagine that we'd also want to kill the whole process in case this happens?
(or maybe in this case it would be ok to simply show a warning in the terminal?)
The text was updated successfully, but these errors were encountered:
During the module runner initialization we call
createModuleRunner
:vite-plugin-cloudflare/packages/vite-plugin-cloudflare/src/runner/index.ts
Line 162 in 25f8cd6
In this function we the module runner is created by instantiating a new
ModuleRunner
instance.The classes constructor is pretty unlikely to throw, but I don't think that that's not impossible (especially when developing our plugin) and if that happens no error is presented anywhere and we simply end up with a non instantiated module runner (which might be quite surprising during debugging).
I think it would be much nicer to have some proper error handling here and on the dev server side of things even kill the whole process in case some error was actually thrown (since if a module runner is not present the whole environment is not actually usable).
Additionally we have this code to make sure that we don't create multiple module runners per environment:
vite-plugin-cloudflare/packages/vite-plugin-cloudflare/src/runner/module-runner.ts
Lines 12 to 14 in 25f8cd6
But again this error is practically suppressed, I'd imagine that we'd also want to kill the whole process in case this happens?
(or maybe in this case it would be ok to simply show a warning in the terminal?)
The text was updated successfully, but these errors were encountered: