P粉0526867102023-08-27 11:25:02
vue-demi
Less necessary than before the 2.7 release, but if you want to create a truly universal library that can run on all versions of Vue 2, not just that, then it Still relevant to 2.7. Many users have not and will not upgrade from 2.6 to 2.7. Additionally, vue-demi still provides some additional compatibility features. From vue-demi
Readme:
Regarding your question about @vitejs/plugin-vue
and @vitejs/plugin-vue2
, you seem to be confusing the Vite library with the Vue library. Vite provides the functionality to actually run and compile Vue, and since Vue 2 and Vue 3 run fundamentally differently, Vite would definitely require 2 different libraries to support each. If you are writing a library that can run in a Vue application, you may want to take advantage of vue-demi
to ensure maximum compatibility.