chore: add more openai
This commit is contained in:
+3
-1
@@ -10,11 +10,13 @@ window.addEventListener('vite:preloadError', () => {
|
||||
window.location.reload()
|
||||
})
|
||||
|
||||
const BASE_URL = (window as any).__BASE_URL__ || ''
|
||||
|
||||
createApp(App)
|
||||
.use(router)
|
||||
.use(VueMonacoEditorPlugin, {
|
||||
paths: {
|
||||
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs'
|
||||
vs: BASE_URL + '/vs'
|
||||
}
|
||||
})
|
||||
.mount('#app')
|
||||
|
||||
@@ -97,7 +97,7 @@ function getLangIcon(plugin: string) {
|
||||
'kubernetes': 'kubernetes/kubernetes-plain.svg',
|
||||
'ansible': 'ansible/ansible-original.svg',
|
||||
}
|
||||
return mapping[name] ? `https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${mapping[name]}` : ''
|
||||
return mapping[name] ? `https://fastly.jsdelivr.net/gh/devicons/devicon/icons/${mapping[name]}` : ''
|
||||
}
|
||||
|
||||
async function fetchPaths() {
|
||||
|
||||
@@ -229,7 +229,7 @@ function getLangIcon(plugin: string) {
|
||||
}
|
||||
|
||||
if (mapping[name]) {
|
||||
return `https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${mapping[name]}`
|
||||
return `https://fastly.jsdelivr.net/gh/devicons/devicon/icons/${mapping[name]}`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ function getLangIcon(plugin: string) {
|
||||
}
|
||||
|
||||
if (mapping[name]) {
|
||||
return `https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${mapping[name]}`
|
||||
return `https://fastly.jsdelivr.net/gh/devicons/devicon/icons/${mapping[name]}`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
+13
-1
@@ -1,10 +1,22 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue(), tailwindcss()],
|
||||
plugins: [
|
||||
vue(),
|
||||
tailwindcss(),
|
||||
viteStaticCopy({
|
||||
targets: [
|
||||
{
|
||||
src: 'node_modules/monaco-editor/min/vs',
|
||||
dest: '.'
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
|
||||
Reference in New Issue
Block a user