Skip to content

fix(cdn): support path format for custom cdn provider via custom.type - #409

Open
a2501521908 wants to merge 1 commit into
XPoet:devfrom
a2501521908:fix/custom-cdn-path-type
Open

fix(cdn): support path format for custom cdn provider via custom.type#409
a2501521908 wants to merge 1 commit into
XPoet:devfrom
a2501521908:fix/custom-cdn-path-type

Conversation

@a2501521908

Copy link
Copy Markdown

我这边根据这个 #407 (comment) 问题简单写了个PR,把cdnjs的自定义给修复了,辛苦作者看下~

The custom cdn provider previously hard-coded the jsdelivr/unpkg path
format (`${url}@${version}/source/${path}`). Mirrors such as cdnjs and
BootCDN use a different structure (`${url}/${version}/${min-path}`,
without `@version` and `/source/`), so custom cdnjs-style mirrors
returned 404.

Add a `custom.type` option (cdnjs | jsdelivr | unpkg | raw) to control
the generated url format. Defaults to jsdelivr style, keeping full
backward compatibility with existing custom / cdnjs / jsdelivr / unpkg
configurations.

Refs XPoet#407
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

Successfully merging this pull request may close these issues.

1 participant