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

Allow specifying npm dependency that Wasp already uses, with different version #59

Martinsos opened this issue Sep 29, 2020 · 0 comments
enhancement New feature or request


Copy link

Right now, if Wasper wants to specify an npm dependency (via dependencies declaration) that Wasp is already using in generated code (for example react or react-query), they will get an error message saying that Wasp is already using this package and that they have to specify exactly the same version as Wasp is using.

Next step is to allow Wasper to specify any version they like, and this should be implemented internally via npm aliases, where wasp would use npm alias to refer to its version of package in different way than Wasper. So for example if Wasper declared "react": "^16.12.0" but Wasp is using "react": "^15.0.0", then Wasp should change the name of its dependency via npm aliases to be smth like react-wasp instead of just react. It might still be smart to "warn" Wasper that they are choosing different version than Wasp and that they might want to instead use the same version, to avoid possibly redundant dependencies.

Implementation of this should probably start from Generator.PackageJsonGenerator module.

Much of this is also discussed in possibly more details in issue #11 , where current implementation was designed and future implementations were discussed.

@Martinsos Martinsos added the enhancement New feature or request label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
enhancement New feature or request
None yet

No branches or pull requests

1 participant