ElMassimo / vite_ruby

⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience
https://vite-ruby.netlify.app/
MIT License
1.28k stars 117 forks source link

Add `vite.config.mjs` to watched paths #442

Closed janko closed 5 months ago

janko commented 5 months ago

Description 📖

This ensures building isn't skipped when .mjs extension is used for the Vite config file.

Background 📜

Vite 5 deprecated CJS, so unless "type": "module" is specified in package.json (which requires using .cjs extension things like PostCSS config), the only way to avoid the deprecation warning is to rename the config file to vite.config.mjs.

https://vitejs.dev/guide/migration.html#deprecate-cjs-node-api

The Fix 🔨

I added vite.config.mjs to default watched paths.

ElMassimo commented 5 months ago

Thanks Janko!