如何使用纱线为命名空间包设置注册表?

k0p*_*kus 5 javascript npm sinopia yarnpkg

我正在yarn尝试作为npm.

对于 npm,我们使用私有的 sinopia 注册中心和一些命名空间包的官方存储库,因为 sinopia 不处理命名空间。

因为我.npmrc定义了这些注册表。

registry=http://sinopia-registry.internal:4873/
@types:registry=https://registry.npmjs.org
Run Code Online (Sandbox Code Playgroud)

我知道我可以在全球范围在注册表中设置yarn在其.yarnrc通过:

registry "http://sinopia-registry.internal:4873/"
Run Code Online (Sandbox Code Playgroud)

然而,我如何告诉 yarn 使用不同的注册表形式@types命名空间包?

我在以下方面尝试了不同的方法:

registry @types "https://registry.npmjs.org/"
Run Code Online (Sandbox Code Playgroud)

然而,它们都导致 yarn 抱怨语法错误。

Bra*_*ing 1

尝试改为使用:

"@types:registry" "https://registry.npmjs.org"
Run Code Online (Sandbox Code Playgroud)