Vite is a modern frontend build tool that provides an extremely fast development environment and bundles your code for production. It will change your development experience with super fast hot reloading 🚅.
But there is an issue with nuxt 2.15.8 in integration. You will get an error called -
Cannot find module 'lib/axios'
So fix that, let's start from begging I mean from installation part-
To install vite with simple command
npm i -D nuxt-vite
Add to buildModules in
buildModules: [ 'nuxt-vite' ],
And now you will get this error
Cannot find module 'lib/axios'. This problem comes from vite version. Let's downgrade, then our error will be gone.
package.json file downgrade vite version
"nuxt-vite: 0.3.5" to
Then again install all dependencies by
Now you can run
npm run dev and enjoy
vite blessing fast speed.
If you are in 1st place I mean you are going to install
vite you can install specific version by
npm install email@example.com