Skip to content

Commit

Permalink
fix: load CDN url (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjunjian authored Oct 23, 2023
1 parent 2857645 commit 09f4de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/dependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface Dependency {
}

export type Cdn = 'unpkg' | 'jsdelivr' | 'jsdelivr-fastly'
export const cdn = useLocalStorage('setting-cdn', 'https://unpkg.com')
export const cdn = useLocalStorage('setting-cdn', localStorage.getItem('setting-cdn') || 'https://unpkg.com')

export function genCdnLink(pkg: string, version: string | undefined, path: string) {
version = version ? `@${version}` : ''
Expand Down

0 comments on commit 09f4de6

Please sign in to comment.