mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-12 18:00:47 +01:00
Detection of Vue.js v2 and v3 improved (#825)
This commit is contained in:
parent
2c4629d87a
commit
cbf0c058c0
@ -201,9 +201,22 @@ shorthands.specialFiles = function (channelHost, channelPath, searchString) {
|
||||
'path': `resources/materialize/1.0.0/${channelPath}`,
|
||||
'bundle': 'Materialize'
|
||||
};
|
||||
} else if ((/cdn\.jsdelivr\.net\/npm\/vue@(2|3)/).test(CompleteURL)) {
|
||||
let version = CompleteURL.match(Resource.VERSION_EXPRESSION);
|
||||
lastVersion = targets.setLastVersion(`/vue/${version}.`);
|
||||
} else if (CompleteURL === 'cdn.jsdelivr.net/npm/vue@2') {
|
||||
lastVersion = targets.setLastVersion('/vue/2.');
|
||||
if (lastVersion === '') {
|
||||
return {
|
||||
'result': false,
|
||||
};
|
||||
}
|
||||
return {
|
||||
'source': channelHost,
|
||||
'versionDelivered': lastVersion,
|
||||
'versionRequested': lastVersion,
|
||||
'path': `resources/vue/${lastVersion}/vue.min.jsm`,
|
||||
'bundle': ''
|
||||
};
|
||||
} else if (CompleteURL === 'cdn.jsdelivr.net/npm/vue@3') {
|
||||
lastVersion = targets.setLastVersion('/vue/3.');
|
||||
if (lastVersion === '') {
|
||||
return {
|
||||
'result': false,
|
||||
|
@ -38,6 +38,7 @@
|
||||
<ul>
|
||||
<li>Include CNAME of CDNs (<a href="https://codeberg.org/nobody/LocalCDN/issues/816">#816</a>)</li>
|
||||
<li>Removed obsolete CDN (<a href="https://codeberg.org/nobody/LocalCDN/issues/786">#786</a>)</li>
|
||||
<li>Detection of Vue.js v2 and v3 improved (<a href="https://codeberg.org/nobody/LocalCDN/issues/825">#825</a>)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="generator-section">
|
||||
|
Loading…
x
Reference in New Issue
Block a user