I read this: How do I override nested NPM dependency versions?
Unfortunately, it does not solve my problem.
I am trying to change a package from using a specific dependency to use another version of that dependency.
Is it built into a package what version of a dependency it should use, or is it possible to change it?
In my case specifically, I am trying to change css-loader
's default dependency on [email protected]
(latest) to instead be dependent on [email protected]
(next).
From the second answer in the above link, user trickpatty notes that:
this will be removed anytime you run npm i instead of editing your package-lock.json and adding the child dependency to "dependencies" there, add the child dependency to your package.json "dependencies" section
Including [email protected]
in package.json's devDependencies does nothing to css-loader
. It still uses the other (default) version of cssnano
.