-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
41 lines (35 loc) · 928 Bytes
/
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
import path from 'node:path'
import { defineConfig, mergeConfig } from 'vitest/config'
import dts from 'vite-plugin-dts'
export const commonConfig = defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'tests': path.resolve(__dirname, 'tests'),
},
},
})
export default mergeConfig(commonConfig, defineConfig({
test: {
dir: './tests',
silent: Boolean(process.env.CI),
},
build: {
minify: false,
sourcemap: true,
lib: {
entry: path.resolve(__dirname, './src/index.ts'),
name: 'RstCompiler',
fileName: 'index',
},
rollupOptions: {
external: ['katex', 'shiki'],
},
},
plugins: [
dts({
insertTypesEntry: true,
tsconfigPath: path.resolve(__dirname, './tsconfig.prod.json'),
}),
],
}))