@@ -27,6 +27,11 @@ const NPM_EXTERNAL_PACKAGES = [
2727 / ^ l i t - h t m l / ,
2828 ] ,
2929 CDN_EXTERNAL_PACKAGES = [ 'media-captions' , 'media-icons' , 'media-icons/element' ] ,
30+ CDN_EXTERNAL_PATHS = {
31+ 'media-icons' :
'https://cdn.jsdelivr.net/npm/[email protected] /dist/lazy.js/+esm' , 32+ 'media-icons/element' :
'https://cdn.jsdelivr.net/npm/[email protected] /dist/cdn.js/+esm' , 33+ 'media-captions' :
'https://cdn.jsdelivr.net/npm/[email protected] /dist/prod.js/+esm' , 34+ } ,
3035 PLUGINS_EXTERNAL_PACKAGES = [ 'vite' , 'rollup' , / w e b p a c k / , / r s p a c k / , 'esbuild' , 'unplugin' ] ;
3136
3237if ( ! MODE_TYPES && MODE_WATCH ) {
@@ -250,15 +255,7 @@ function defineCDNBundle({
250255 entryFileNames : ( chunk : { name : string } ) =>
251256 chunk . name === file ? `[name].js` : `[name]-[hash].js` ,
252257 minifyInternalExports : false ,
253- paths : {
254- 'media-icons' : legacy
255- ? 'https://cdn.jsdelivr.net/npm/media-icons@next/dist/lazy.js'
256- : 'https://cdn.vidstack.io/icons' ,
257- 'media-captions' : legacy
258- ? 'https://cdn.jsdelivr.net/npm/media-captions@next/dist/prod.js'
259- : 'https://cdn.vidstack.io/captions' ,
260- 'media-icons/element' : 'https://cdn.vidstack.io/icons' ,
261- } ,
258+ paths : CDN_EXTERNAL_PATHS ,
262259 codeSplitting : dev ? false : { groups : [ { name : 'frameworks' , test : / n o d e _ m o d u l e s / } ] } ,
263260 } ,
264261 plugins : [ decorators ( ) as any , ! legacy && ( rewriteCDNChunks ( file ) as any ) ] . filter (
0 commit comments