-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvite.config.ts
More file actions
61 lines (60 loc) · 1.35 KB
/
vite.config.ts
File metadata and controls
61 lines (60 loc) · 1.35 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
49
50
51
52
53
54
55
56
57
58
59
60
61
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import svgr from "vite-plugin-svgr";
import { VitePluginRadar } from "vite-plugin-radar";
import tsconfigPaths from "vite-tsconfig-paths";
import copyDtsPlugin from 'vite-plugin-copy-dts'
// https://vitejs.dev/config/
export default defineConfig({
build: {
target: "es2020",
},
plugins: [
VitePluginRadar({
// Google Analytics tag injection
analytics: {
id: "G-R44XEKE06H",
}
}),
react(),
tsconfigPaths(),
svgr({
svgrOptions: {
// svgr options
},
}),
// Configuration for copyDtsPlugin
copyDtsPlugin({
files: [
{
from: ['types/*', 'src/types/extension.d.ts'],
to: 'target.d.ts',
excludes: ['types/excludes.d.ts']
},
{
from: 'src/types/extension.d.ts',
to: 'target.d.ts'
},
{
from: 'blog.html',
to: 'dist/blog.html'
},
{
from: 'sitemap.xml',
to: 'dist/sitemap.xml'
},
{
from: '176a83f2d025494581edba19ccdf4c5d.txt',
to: 'dist/176a83f2d025494581edba19ccdf4c5d.txt'
},
{
from: 'robots.txt',
to: 'dist/robots.txt'
}
]
}),
],
define: {
"process.env": {},
},
});