haoqunjiang / vite-jest

First-class Vite integration for Jest
MIT License
406 stars 51 forks source link

A way to include dependencies for dev server in optimizeDeps to find everything first run #30

Open rquast opened 3 years ago

rquast commented 3 years ago

I had problems with vite-jest not finding all dependencies the first run until I realised that you have to have the dev server include them in optimizeDeps. Otherwise, it may take a few runs for vite to pick them up. I ended up moving the vite-jest code base into my project to get around this.

My question is - is there a good way that we can change the vite-jest code to make the dev server, vite-server.js inside of vite-jest easily configurable?