Do I need the @vitejs/plugin-vue dependency?

I'm trying to migrate a Vue2 project from Vue-CLI/Webpack to Vite. This migration guide says @vitejs/plugin-vue should be added as a dev dependency, but I'm not sure if I really need it, or if I do, which version I should use?

The documentation on GitHub doesn't say much about what this plugin is for, or when it should be installed.


@vitejs/plugin-vue is for Vue 3. You can use vite-plugin-vue2 for Vue 2.

I made a sample project with Vite, Vue2 and TailwindCSS that you can test / fork on stackblitz.

  • https://stackblitz.com/edit/vitejs-vite-hu1crh