-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
38 lines (37 loc) · 1.03 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 { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import reactSvgPlugin from 'vite-plugin-react-svg';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import tsconfigPaths from 'vite-tsconfig-paths';
import crossOriginIsolation from 'vite-plugin-cross-origin-isolation';
import { VitePWA } from 'vite-plugin-pwa';
import eslintPlugin from 'vite-plugin-eslint';
// https://vitejs.dev/config/
export default defineConfig({
server: {
proxy: {
'/api': 'http://localhost:4000',
},
},
plugins: [
eslintPlugin({
throwOnWarning: false,
throwOnError: false,
}),
reactRefresh(),
// TODO: Configure PWA
VitePWA(),
reactSvgPlugin({
defaultExport: 'url',
expandProps: 'end',
svgo: true,
svgoConfig: {
plugins: [{ removeAttrs: { attrs: '(width|height|fill)' } }],
},
}),
vanillaExtractPlugin(),
crossOriginIsolation(),
// keep this as the last plugin
tsconfigPaths({ root: '.' }),
],
});