-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
43 lines (41 loc) · 894 Bytes
/
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
import { resolve } from 'path';
import { defineConfig, loadEnv } from 'vite';
import vue2 from '@vitejs/plugin-vue2';
import stylelint from 'vite-plugin-stylelint';
import inspect from 'vite-plugin-inspect';
export default ({ mode }) => {
const { VITE_PORT, VITE_BASE_URL } = loadEnv(mode, process.cwd());
return defineConfig({
base: VITE_BASE_URL,
plugins: [
vue2(),
stylelint({
fix: true,
cache: false,
}),
inspect(),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
css: {
modules: false,
},
server: {
https: false,
port: VITE_PORT,
host: '0.0.0.0',
open: true,
cors: true,
proxy: {},
},
build: {
target: 'es2015',
sourcemap: false,
chunkSizeWarningLimit: 2000,
reportCompressedSize: false,
},
});
};