IndexXuan / vue-cli-plugin-vite

Use vite today, with vue-cli.

Home Page:https://github.com/IndexXuan/vue-cli-plugin-vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature/devServer.before

IndexXuan opened this issue · comments

https://vitejs.dev/guide/api-javascript.html#vitedevserver
https://webpack.js.org/configuration/dev-server/#devserverbefore

vite expose connectjs instance while webpack devServer expose expressjs instance
many use use vue.config.js#devServer#before to mount mock api server for development
how to do this in vite with compatibility ? maybe we should transform connect instance to express instance in vite#configureServer hook payload