In addition to the current CLI mode, how about also offering a plugin mode:
import { server } from 'vite-node/plugin'
export default {
plugins: [server({
entry: './path/to/server.js'
})]
}
So that when calling
$ vite
it would apply vite-node to ./path/to/server.js.
I'd argue to eventually merge vite-node into vite. With our progress https://github.com/vitejs/vite/discussions/4921 Vite will have first-class support for Node.js and then it would be super neat to merge vite-node into vite; it will make Vite the standard way of using TypeScript for Node.js.
In addition to the current CLI mode, how about also offering a plugin mode:
So that when calling
it would apply
vite-node
to./path/to/server.js
.I'd argue to eventually merge
vite-node
intovite
. With our progress https://github.com/vitejs/vite/discussions/4921 Vite will have first-class support for Node.js and then it would be super neat to mergevite-node
intovite
; it will make Vite the standard way of using TypeScript for Node.js.