Is there any way to force a specific version of np...
# javascript
r
Is there any way to force a specific version of npm dependency globally? If I specify the version explicitly in gradle it's being used inside a "local"
node_modules
, but I need to force this in "project" `node_modules' (
built/js/node_modules
).
t
Which dependency?
r
I think I need to be able to add custom
resolution
field to the
package.json
generated by Kotlin/JS. Is it possible?
👌 1
How can I do this?
t
You can modify
package.json
manually Example
r
There are two
package.json
files generated by the build process. This generated by
packageJson
task and the second one, generated by
kotlinNpmInstall
task. The second one is used by Yarn and
resolutions
field need to be placed in there. But there is no single task to bind modification function. It seems this
package.json
is generated and used in a single gradle task and I don't see any way to modify it before Yarn is called. Any ideas?
t
Risky 🙂
👍 1
r
"risky" is a tag name for all Kotlin/JS ;-)