antfu / vite-node

Vite as Node.js runtime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto-reload server

brillout opened this issue · comments

commented

Is there any blocker for not supporting auto-reload? I believe it should be feasible with Vite's HMR with vite.ssrLoadModule().

Thanks for this neat project.

To be honest, I am not very familiar with SSR, this project was originally designed to run cli scripts (and then exit). I do implement a watch mode (-w) to provide a similar feature like nodemon but without shutting down the sever. Would love to have more info about your user case, or if you see it's feasible to do, PR is also greatly welcome!

commented

Would love to have more info about your user case

Basically using vite-node instead of ts-node for https://github.com/brillout/vite-plugin-ssr/tree/master/boilerplates/boilerplate-vue-ts

PR is also greatly welcome!

Right now using ts-node is ok and changing that is not a top priority, but yea I may eventually PR :-)

Have you check esno or tsm? They use esbuild directly and should be faster than ts-node and vite-node.

commented

Neat, I will check them out. Thanks :-)