importing scoped NPM packages from other registries
In node, I can create an
See: https://docs.npmjs.com/cli/v7/configuring-npm/npmrc#comments
This causes
I don't yet see a way to accomplish this with Deno. Is there one?
What I've tried:
This, however, seems to use that configured registry for ALL NPM packages. However, most packages will NOT be found at this specified registry--only the ones in the
And:
The problem with this seems to be that Deno does not treat the response as an NPM package, because the specifier in the import map is
Is there a way to specify the private registry URL in the import map and that it should be fetched as an NPM package?
.npmrc that has rules like this:See: https://docs.npmjs.com/cli/v7/configuring-npm/npmrc#comments
This causes
import { foo } from '@custom/foo' to be loaded from that specified registry instead of the default NPM registry, using the configured authToken. It leaves all other NPM packages to continue being retrieved via the default registry.I don't yet see a way to accomplish this with Deno. Is there one?
What I've tried:
- using
NPM_CONFIG_REGISTRY
This, however, seems to use that configured registry for ALL NPM packages. However, most packages will NOT be found at this specified registry--only the ones in the
@custom scope. So when it comes to something like lodash, it fails trying to fetch lodash from npm.example.com.- using import maps and DENO_AUTH_TOKEN
And:
export DENO_AUTH_TOKENS="DEADBEEF@npm.example.com"The problem with this seems to be that Deno does not treat the response as an NPM package, because the specifier in the import map is
https:. I suppose it's treating it as if it were retrieving a deno package from the denoland package registry.Is there a way to specify the private registry URL in the import map and that it should be fetched as an NPM package?