rwieruch / blog_robinwieruch_content

✏️ Content of robinwieruch.de - Write guest blog posts or improve the content. Your help means a lot to me.
https://www.robinwieruch.de/
321 stars 396 forks source link

import defineConfig from vitest/config #320

Open nicehatharry opened 5 months ago

nicehatharry commented 5 months ago

The defineConfig function from vite is not type aware of the 'test' parameter. Importing defineConfig from 'vitest/config' fixes.

jan-gebauer commented 4 months ago

+1

I got stuck on this as well this morning. I ended up creating vitest.config.ts. I am not sure, which is better because Vitest touts the common config as a feature but VSCode does not offer an import of defineConfig from vitest/config. I suspect the real problem lies with Vite.