mswjs / msw

Industry standard API mocking for JavaScript.
https://mswjs.io
MIT License
15.97k stars 519 forks source link

chore: update vitest configuration to ESM #2189

Closed KaiSpencer closed 4 months ago

KaiSpencer commented 5 months ago

Vitest (and Vite) Commonjs build is deprecated and will be removed in a future version. There is a console warning when running tests indicating to update to use Vites ESM build.

Relevant docs from Vite: https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated

Screenshot 2024-06-24 at 13 38 48

This PR updates the vitest config files to use an .mts extension and therefore use the Vite ESM build.

kettanaito commented 4 months ago

Released: v2.3.2 🎉

This has been released in v2.3.2!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.