-
-
Notifications
You must be signed in to change notification settings - Fork 143
Description
Problem Description
First of all, great work so far! I really appreciate the modular approach and wide framework support, but regarding the dependency installation, this comes with a downside right now. All the different frameworks (e.g. Vue, React, ...) are declared as peer dependencies in the package.json of the different packages (see for example packages/core/package.json).
As of npm@7 the peer dependencies are automatically installed if they are not yet present.
This means, that React, Svelte and Co. are installed even though I might only want to use the Vue functionality.
To keep the modular approach also on dependency level, I would appreciate it if I was in control of what specific framework dependencies are installed.
Suggested solution
The frameworks are correct in the peer dependency section, but with the peerDependenciesMeta it is possible to mark them as optional.
"peerDependenciesMeta": {
"preact": { "optional": true },
"react": { "optional": true },
"react-dom": { "optional": true },
"svelte": { "optional": true },
"vue": { "optional": true }
},This way the peer dependency restriction are still checked, when I have a specific framework installed, but I only need one framework installed for my specific case.