underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

Dependency in @vitejs/plugin-vue forces vue 3 install #110

Closed cmcnicholas closed 3 years ago

cmcnicholas commented 3 years ago

Is there any recommended way to use this plugin now that the @vitejs/plugin-vue expects v3 of vue to be installed in the root project?

I get this now when installing latest:

npm update --save-dev @vitejs/plugin-vue
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: alloy-web@1.0.0
npm ERR! Found: vue@2.6.14
npm ERR! node_modules/vue
npm ERR!   vue@"^2.6.14" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"3.1.5" from @vue/compiler-sfc@3.1.5
npm ERR! node_modules/@vue/compiler-sfc
npm ERR!   peer @vue/compiler-sfc@"^3.0.8" from @vitejs/plugin-vue@1.2.5
npm ERR!   node_modules/@vitejs/plugin-vue
npm ERR!     dev @vitejs/plugin-vue@"^1.2.4" from the root project      
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

if it's no longer possible to use vue 2 then is this an issue for this plugin?

screetBloom commented 3 years ago

@vitejs/plugin-vue is used by the Vue3

In the Vue2, It is not necessary to install @vitejs/plugin-vue


plz use vite-plugin-vue2 like this👇: https://github.com/underfin/vite-plugin-vue2/tree/master/playground

cmcnicholas commented 3 years ago

@vitejs/plugin-vue is used by the Vue3

In the Vue2, It is not necessary to install @vitejs/plugin-vue

plz use vite-plugin-vue2 like this👇: https://github.com/underfin/vite-plugin-vue2/tree/master/playground

you are absolutely correct, I am an idiot, closing