gloriasoft / veaury

Use React in Vue3 and Vue3 in React, And as perfect as possible!
MIT License
1.27k stars 81 forks source link

Why not add 'vue-loader' into dependencies? #135

Closed Areo-Joe closed 1 month ago

Areo-Joe commented 1 month ago

Since veaury uses 'vue-loader' as

// webpack/VeauryVuePlugin.js
const {VueLoaderPlugin} = require('vue-loader')

Why it is not present in package.json? Not explicit dependency may cause error when using tools like yarn, which require package to explicitly list their dependencies.

devilwjp commented 1 month ago

@Areo-Joe Veaury can be used in different build environments, not just webpack, such as vite, rollup, etc., but vue-loader is only used for projects built by webpack and is not a universal dependency, so it should not appear In the dependencies attribute of package.json.
Moreover, different versions of webpack have different version requirements for vue-loader. Therefore, users need to install the correct version of vue-loader according to their own project conditions. Veaury cannot hard-code a vue-loader version.