-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
38 lines (37 loc) · 1.01 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
import path from 'node:path';
import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
import url from '@rollup/plugin-url';
import image from '@rollup/plugin-image';
// https://vitejs.dev/config/
export default defineConfig({
base: '',
plugins: [
reactRefresh(),
// {
// ...image(),
// //enforce: 'pre',
// },
{
...url(
{
include: ['**/*.svg'],
limit: 15000,
}
),
enforce: 'pre',
},
visualizer({
filename: 'vizualization.html',
template: 'sunburst', // sunburst - d3 style (good as default as well); treemap - table (default); network - graph (slow to open).
gzipSize: true,
brotliSize: true,
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});