Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能不支持和jsdelivr&unpkg一样的npm路径格式后缀,这样方便在importmap中用 #96

Closed
i18nsite opened this issue Jun 1, 2024 · 1 comment

Comments

@i18nsite
Copy link
Contributor

i18nsite commented Jun 1, 2024

比如我用importmap
定义了前缀, 方便直接引用npm包

{"imports":{"npm/":"https://cdn.jsdelivr.net/npm/"}}

然后国内用户我想切换到 npmmirror ,但是我发现路径格式后缀不一样,没法直接切换

https://registry.npmmirror.com/jquery/3.6.4/files/dist/jquery.min.js
https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
https://unpkg.com/[email protected]/dist/jquery.min.js

你可以看到 https://cdn.jsdelivr.net/npmhttps://unpkg.com 路径格式一样,可以直接替换importmap,但是 npmmirror 不行

@i18nsite i18nsite changed the title 能不支持和jsdelivr一样的npm路径格式后缀,这样方便在importmap中用 能不支持和jsdelivr&unpkg一样的npm路径格式后缀,这样方便在importmap中用 Jun 1, 2024
@i18nsite i18nsite closed this as completed Jun 1, 2024
@i18nsite
Copy link
Contributor Author

i18nsite commented Jun 1, 2024

反馈到 cnpm/cnpmcore#696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant