-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
46 lines (44 loc) · 1.18 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
import devtools from 'solid-devtools/vite'
import AutoImport from 'unplugin-auto-import/vite'
import swc from 'unplugin-swc'
import { defineConfig } from 'vite'
import { analyzer } from 'vite-bundle-analyzer'
import { chunkSplitPlugin } from 'vite-plugin-chunk-split'
import { qrcode } from 'vite-plugin-qrcode'
import solid from 'vite-plugin-solid'
import tsconfigPaths from 'vite-tsconfig-paths'
import { imports, importTypes } from './auto-import'
export default defineConfig({
build: { sourcemap: true },
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
plugins: [
AutoImport({
dts: 'src/generated/auto-imports.d.ts',
eslintrc: { enabled: true },
imports: [
'@solidjs/router',
'solid-js',
{
'axios': [['default', 'axios']]
},
...imports,
...importTypes
],
include: [/\.[jt]sx?$/]
}),
analyzer(),
qrcode(),
solid({ hot: false }),
tsconfigPaths(),
swc.vite({ minify: true }),
devtools({
autoname: true,
locator: {
componentLocation: true,
jsxLocation: true,
targetIDE: 'vscode'
}
}),
chunkSplitPlugin()
]
})