fix(cdn): support path format for custom cdn provider via custom.type - #409
Open
a2501521908 wants to merge 1 commit into
Open
fix(cdn): support path format for custom cdn provider via custom.type#409a2501521908 wants to merge 1 commit into
a2501521908 wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
我这边根据这个 #407 (comment) 问题简单写了个PR,把cdnjs的自定义给修复了,辛苦作者看下~