dependents / detective-vue2

MIT License
0 stars 3 forks source link

@vue/compiler-sfc@3.x is a dependency and gets installed with Vue 2 projects #10

Open JessicaSachs opened 1 month ago

JessicaSachs commented 1 month ago

Hi! I was looking throughout a dependency graph of a Vue 2 + Vite project and noticed that the Vue 3 compiler chain was being included alongside the Vue 2 compiler chain, and npm was having issues properly de-duping the multiple conflicting dependencies.

I'm not quite sure why detective-vue2 has a dependency on the Vue 3+ compiler version.

It seems like this is best suited to be an optionalPeerDependency with a version range that includes 2.x and 3.x, not a real dependency

Could you fix the versioning?

Havunen commented 1 month ago

Hi,

Because vue3 compiler can parse dependencies from the vue2 and vue3 SFC templates. Its not optional dependency. I am not aware of how we could require vue2 or vue3 version of the package. If I remember correctly they also had different API so the code would need some adjustments as well.

Havunen commented 1 month ago

The name is detective-vue2 because somebody else took detective-vue -name. Later this library was migrated to dependents -organisation and the name remained same