Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce manditory dependencies downloads by optionally loading plugins from peerDependencies #4960

Open
cromwellryan opened this issue Dec 13, 2019 · 0 comments

Comments

@cromwellryan
Copy link

What problem does this feature solve?

The @vue/cli-plugin-e2e-cypress and some others are awesome plugins that we use in certain builds. Unfortunately, cypress is a pretty massive download. Plugins can be moved to peerDependencies, but they won't be loaded even if installed based on the current resolution mechanism. I propose that there be a first class list of optional plugins.

With optional plugins, they can only be installed when needed, reducing npm install times considerably.

What does the proposed API look like?

Option: Attempt to resolve peerDependencies
If peerDependencies was included in the resolution of plugins, plugins which aren't installed could follow the optional dependency path. This seems reasonable.

Option: Unique optionalPlugins configuration
Adding an optionalPlugins as peer of the resolveFrom configuration option would separate the mode of installation for plugins (peerDependencies) from the list of plugins that should be optionally attempted.

Open to other ideas as well.

@cromwellryan cromwellryan changed the title Reduce manditory dependencies downlod by optionally loading plugins from peerDependencies Reduce manditory dependencies downloads by optionally loading plugins from peerDependencies Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants