jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
554 stars 58 forks source link

vite5.0 bug #128

Closed ZombieBrand closed 7 months ago

ZombieBrand commented 7 months ago
image
jpkleemans commented 7 months ago

Vite 5 deprecated the CJS Node API, see https://vitejs.dev/guide/migration#deprecate-cjs-node-api You can fix it by setting "type": "module" in your package.json file, or use the .mjs extension, e.g. vite.config.mjs.

jpkleemans commented 7 months ago

Actually I reverted this in release 5.1.0 so now the error should be gone without the need to adjust something.