-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
55 lines (54 loc) · 1.45 KB
/
vite.config.js
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
// vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import svgr from 'vite-plugin-svgr';
export default defineConfig({
plugins: [react(), svgr()],
resolve: {
alias: {
'@': '/src',
},
},
css: {
modules: true, // Enable CSS Modules
},
server: {
// host: 'duarte-seabra.localtest.me',
host: '0.0.0.0',
},
build: {
chunkSizeWarningLimit: 1000, // Set the limit to a different value
assetsInlineLimit: 4096, // Set the limit for inlining assets
// terserOptions: {
// compress: {
// // eslint-disable-next-line camelcase
// drop_console: true,
// },
// // You can add other Terser options here
// },
},
optimizeDeps: {
include: ['url-loader'],
},
rules: [
{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
name: '[name].[hash].[ext]',
outputPath: 'images',
publicPath: '/images',
esModule: false,
},
},
],
},
],
});