File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const virtualModuleId = "adminui" ;
22const resolvedVirtualModuleId = "\0" + virtualModuleId ;
33
4- export default function vitePluginAdminui ( { version = "3" } = { } ) {
5- const vuePath = parseInt ( version , 10 ) === 3 ? "https://cdn.jsdelivr.net/npm/vue@3/dist/vue.esm-browser.prod.min.js" : "https://unpkg.com/vue@2/dist/vue.esm.browser.js"
4+ const getCdnUrl = ( version , mode ) => {
5+ if ( version === 3 && mode == "development" ) {
6+ return "https://cdn.jsdelivr.net/npm/vue@3/dist/vue.esm-browser.js" ;
7+ } else if ( version === 3 ) {
8+ return "https://cdn.jsdelivr.net/npm/vue@3/dist/vue.esm-browser.prod.min.js" ;
9+ } else {
10+ return "https://cdn.jsdelivr.net/npm/vue@2/dist/vue.esm.browser.min.js" ;
11+ }
12+ } ;
13+
14+ export default function vitePluginAdminui ( { version = "3" , mode = "production" } = { } ) {
15+ const vuePath = getCdnUrl ( parseInt ( version , 10 ) , mode ) ;
616
717 return {
818 name : "vite-plugin-adminui" ,
You can’t perform that action at this time.
0 commit comments