-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathvite.config.ts
More file actions
17 lines (15 loc) · 629 Bytes
/
vite.config.ts
File metadata and controls
17 lines (15 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import { visualizer } from 'rollup-plugin-visualizer';
import { compression } from 'vite-plugin-compression2';
const filter = /\.(ts|tsx|js|jsx|mjs|json|css|svg|html)$/i;
export default defineConfig({
plugins: [
react(),
compression({ algorithm: 'gzip', filter }),
compression({ algorithm: 'brotliCompress', filter }),
visualizer({ filename: './stats/stats.html' }),
],
define: { __APP_VERSION__: JSON.stringify(process.env.npm_package_version) },
css: { preprocessorOptions: { scss: { api: 'modern-compiler' } } },
});