repl
repl copied to clipboard
Feat: all cdn resources can be replaced
- refactor(deps): @volar/jsdelivr -> local
- feat(monaco): allow resources to be requested on demand without relying on jsdelivr-flat
- https://data.jsdelivr.com/v1/package/npm/[email protected]/flat
- https://unpkg.com/[email protected]/dist/?meta
- https://registry.npmmirror.com/vue/3.5.13/files/dist/?meta
- feat(store):
resourceLinksto custom cdn
const store = useStore({
resourceLinks: ref({
esModuleShims: 'https://registry.npmmirror.com/es-module-shims/1.5.18/files/dist/es-module-shims.wasm.js',
pkgLatestVersionUrl: (pkgName: string) => `https://registry.npmmirror.com/${pkgName}/latest/files/package.json`,
pkgDirUrl: (pkgName: string, pkgVersion: string, pkgPath: string) => `https://registry.npmmirror.com/${pkgName}/${pkgVersion}/files/${pkgPath}/?meta`,
pkgFileTextUrl: (pkgName: string, pkgVersion: string | undefined, pkgPath: string) => `https://registry.npmmirror.com/${pkgName}/${pkgVersion || 'latest'}/files/${pkgPath}`,
typescriptLib: (version) => `https://registry.npmmirror.com/typescript/${version}/files/lib/typescript.js`,
}),
})
export type ResourceLinkConfigs = {
esModuleShims?: string
vueCompilerUrl?: (version: string) => string
typescriptLib?: (version: string) => string
// for monaco
pkgLatestVersionUrl?: (pkgName: string) => string
pkgDirUrl?: (pkgName: string, pkgVersion: string, pkgPath: string) => string
pkgFileTextUrl?: (pkgName: string, pkgVersion: string | undefined, pkgPath: string) => string
}
close https://github.com/vuejs/repl/issues/280 https://github.com/vuejs/repl/issues/159
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| repl | Preview | Comment | Nov 25, 2025 1:55am |
LGTM. I feel we need add some docs for this feature.
Hi 👋 @edison1105 . Added some cases (unpkg, npmmirror) https://github.com/vuejs/repl/blob/feat-switch-npm-registry/README.md
@wangcch Could you please resolve those conflicts?
@wangcch Could you please resolve those conflicts?
ok sorry, my progress is a bit behind schedule. 🙈
@wangcch No worries, let's merge it in the next release.