Overview
I have a large vue app that I’m trying to break out into separate packages for organization. There’s a core app, then a handful of additional ‘plugins’ for it. Currently it’s all in one package and there’s a ton of dependencies (because each plugin needs specific dependencies).
The core app includes Vue and Vuetify (the UI Library). If the plugin lists Vue and Vuetify as a peer dependency, does that get built into the final output? I don’t want to have the UI library imported twice but also not sure how tree-shaking will work since the main app might not know what specific UI components the plugin is using. I’m using Vite as well.
I also considered not building the plugins and just distributing the source code as it will only ever be used in the main app, but ran into issues with alias paths not resolving properly in the plugins.
Any insight on this would be helpful.