I have a project, that depends on library @keenmate/js-common-helpers
(which I maintain). This library has dependency on svelte-spa-router
.
I made a fork of library svelte-spa-router
as @keenmate/svelte-spa-router
, that I would like to tell the @keenmate/js-common-helpers
to use, instead of the original dependency svelte-spa-router
(A sort of a dependency-injection of @keenmate/svelte-spa-router
into @keenmate/js-common-helpers
).
I discovered, that NPM allows to “alias” a dependency, so I tried aliasing my package @keenmate/svelte-spa-router
as svelte-spa-router
:
npm i svelte-spa-router@npm:@keenmate/svelte-spa-router
Which did not work, because I found out, that the @keenmate/js-common-helpers
has its own node_modules/
dir with its own svelte-spa-router/
copy which it probably references…
I also discovered an option “, that I tried to use to no avail, like so:
"overrides": {
"@keenmate/js-common-helpers": {
"svelte-spa-router": "npm:@keenmate/svelte-spa-router@^1.0.5"
}
}
Workaround:
Yes, I could change the @keenmate/js-common-helpers
library since I have a direct influence over it and configure it to use @keenmate/svelte-spa-router
… and I might just stick to it in the end as a workaround for now…