-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mts
37 lines (36 loc) · 980 Bytes
/
vite.config.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import Vscode from '@tomjs/vite-plugin-vscode'
import Vue from '@vitejs/plugin-vue'
import Unocss from 'unocss/vite'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
Vue({
template: {
compilerOptions: {
isCustomElement: (tag: string) => tag.startsWith('vscode-'),
},
},
}),
Unocss(),
Vscode({
extension: {
noExternal: [
'reactive-vscode',
'shiki',
'@shikijs/core',
'@tomjs/vite-plugin-vscode',
'@reactive-vscode/vueuse',
'@reactive-vscode/reactivity',
'@vue/reactivity',
'@vue/shared',
],
define: {
__DEV__: 'true',
},
},
webview: {
csp: `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src {{cspSource}} 'unsafe-inline'; script-src 'nonce-{{nonce}}' 'unsafe-eval'; img-src 'self' data:;">`,
},
}),
],
})