-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (47 loc) · 1.05 KB
/
Copy pathvite.config.ts
File metadata and controls
48 lines (47 loc) · 1.05 KB
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
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// @ts-expect-error 未知错误
import dts from 'unplugin-dts/vite';
import { resolve } from 'path';
export default defineConfig({
plugins: [
vue(),
dts({
bundleTypes: false,
tsconfigPath: './tsconfig.json',
}),
],
build: {
lib: {
entry: {
index: resolve(__dirname, 'index.ts'),
component: resolve(__dirname, 'component.ts'),
styles: resolve(__dirname, 'styles.ts'),
},
name: 'VitepressPluginLegend',
formats: ['es', 'cjs'],
},
rollupOptions: {
external: [
'vue',
'markdown-it',
'markmap-lib',
'markmap-view',
'markmap-toolbar',
'mermaid',
'path',
'fs',
],
output: {
globals: {
vue: 'Vue',
'markdown-it': 'MarkdownIt',
'markmap-lib': 'markmap',
'markmap-view': 'markmap',
'markmap-toolbar': 'markmap',
mermaid: 'mermaid',
},
},
},
},
});