vite-plugin-cdn-import是一个专为Vite构建的插件,其设计初衷是为了优化前端项目的资源加载,特别是针对那些通过CDN(内容分发网络)可以更快获取的第三方库。在前端开发中,我们经常会使用到各种流行的JavaScript库和框架,如jQuery、Vue、React等,这些库和框架的本地文件可能会占用较大的空间,并且在每次构建项目时都需要...
{name:"element-plus/dist/index.css",pkgName:"element-plus",path:"index.min.css",isCSS:true,},{name:"vue",var:"Vue",path:"vue.global.prod.min.js",},{name:"vue-router",var:"VueRouter",path:"vue-router.global.prod.min.js",relys:["vue"],},{name:"pinia",var:"Pinia",path:"...
pathSpecify the load path on the CDNstring / string[] cssMultiple style sheets can be loaded from CDN addressesstring / string[] prodUrlOverride global prodUrlstring / string[] NamepordUrl unpkg//unpkg.com/{name}@{version}/{path} cdnjs//cdnjs.cloudflare.com/ajax/libs/{name}/{version}/...
var Variables assigned globally to the module string path Specify the load path on the CDN string / string[] css Multiple style sheets can be loaded from CDN addresses string / string[] prodUrl Override global prodUrl string / string[]Other...
cssYou can alternatively specify multiple style sheets which will be loaded from the CDNstring / string[] NamepordUrl unpkg//unpkg.com/{name}@{version}/{path} cdnjs//cdnjs.cloudflare.com/ajax/libs/{name}/{version}/{path} Releases2 ...
index.cd9c0392.css"> Mode suffix Using suffix@asyncor@deferwithindata-cdn-importcan also generate asynchronoustag of marked module. Example Notice that here's nomode: 'async'in the configs of React module: // vite.config.jsimportcdnImportfrom'vite-plugin-cdn-import-async...
cssMultiple style sheets can be loaded from CDN addressesstring / string[] prodUrlOverride global prodUrlstring / string[] NamepordUrl unpkg//unpkg.com/{name}@{version}/{path} cdnjs//cdnjs.cloudflare.com/ajax/libs/{name}/{version}/{path}...
cssYou can alternatively specify multiple style sheets which will be loaded from the CDNstring / string[] NamepordUrl unpkg//unpkg.com/{name}@{version}/{path} cdnjs//cdnjs.cloudflare.com/ajax/libs/{name}/{version}/{path} Releases2 ...