Webpack-cli: @webpack-cli/init needs to be installed a local dependency

Created on 6 Aug 2018  路  5Comments  路  Source: webpack/webpack-cli

Is your feature request related to a problem? Please describe.
While doing webpack-cli init webpack-scaffold-pwa, I am asked to install @webpack-cli/init as a separate package, even though I have it installed globally. So cli installs it locally, then it sits in my dependencies even though I need it only once. It would take me extra efforts going to my package.json and remove it from there after it has been used.

Describe the solution you'd like
I would like to have @webpack-cli/init installed globally at my system, as I use it once per project and after that, it makes no sense in that package's dependencies. So it should resolve @webpack-cli/init from global packages' list first, then check my local dependencies. And also when I say yes for installation, then it should install it globally.

enhancement

Most helpful comment

You could start to implement it!

All 5 comments

I think user have the choice to install it globally or locally. People have always different needs. What do you think?

I agree people might have different needs, IMHO most people would run this command once when they are setting up a new project so it makes sense to give more precedence to the global package list.

Yep. Agree. Will try to resolve this in a newer version of webpack-cli coming soon.

Hey, I came across this on twitter from a Hacktoberfest tweet. I will like to work on this one.

Should I wait for the new release or start looking on how to implement it?

You could start to implement it!

Was this page helpful?
0 / 5 - 0 ratings