This package is now ESM only in order to align with Vite: https://vitejs.dev/guide/migration#deprecate-cjs-node-api
If your project is using CommonJS, you can rename your Vite config to use the .mjs
or .mts
extension (depending on whether you use TypeScript or not). If you're not using Vite v5.0.0+, you may want to pin your dependency to v4 of this plugin.