-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
73 lines (69 loc) · 2.02 KB
/
vite.config.ts
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'
import dts from 'vite-plugin-dts'
// 代码上色
import {prismjsPlugin} from "vite-plugin-prismjs"
export default defineConfig({
build: {
assetsDir: "assets",
// 如果需要打包成lib文件取消注释即可
// --- 从这里开始 ---
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: "potmot-vue-editor",
fileName: "potmot-vue-editor"
},
rollupOptions: {
external: ['vue', new RegExp('/src/test/.*')],
output: {
globals: {
vue: 'Vue'
}
}
}
// --- 到此为止 ---
},
logLevel: "info",
plugins: [
vue(),
dts(),
prismjsPlugin({
languages: [
'javascript', 'typescript',
'css', 'css-extras', 'html', 'less', 'sass', 'scss',
'svg', 'icon',
'markup', "markdown", "md",
'http', 'uri', 'url',
'c', 'cpp', 'cmake', 'objc',
'rust',
'go',
'php', 'phpdoc',
'perl',
'java', 'javadoc', 'groovy', 'kotlin', 'kt', 'kts', 'scala',
'latex', 'tex', 'matlab',
'sql', 'graphql', 'mongodb',
'erlang',
'lua',
'python', 'py', 'django', 'jinja2',
'csharp', 'dotnet',
'cobol',
'makefile',
'mermaid',
'json', 'json5', 'jsonp',
'xml', 'yaml', 'yml', 'ini', 'toml',
'bash', 'shell', 'batch',
'docker', 'dockerfile',
'git',
'vim',
'dns-zone',
'log',
'qml',
'scheme',
'swift'
],
css: false,
}),
],
base: "./"
});