-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
69 lines (59 loc) · 1.36 KB
/
vite.config.js
File metadata and controls
69 lines (59 loc) · 1.36 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
// https://vite.dev/config/
const host = '127.0.0.1';
const root = './';
const base = './';
const define = {};
const resolve = {
alias: [
{find: '@', replacement: '/public'},
{find: '@lang', replacement: '/src/lang'},
{find: '@views', replacement: '/src/views'},
{find: '@store', replacement: '/src/store'},
{find: '@assets', replacement: '/src/assets'},
{find: '@router', replacement: '/src/router'},
{find: '@components', replacement: '/src/components'},
],
};
const server = {
host: host,
port: 5173,
open: true,
watch: {
usePolling: true,
disableGlobbing: false,
},
};
const build = {
manifest: true,
emptyOutDir: true,
reportCompressedSize: false,
chunkSizeWarningLimit: 4096,
rollupOptions: {
output: {
entryFileNames: '[name]-[hash].js',
assetFileNames: 'assets/[name]-[hash][extname]',
},
},
};
const preview = {
host: host,
port: 4173,
open: true,
};
const plugins = [
vue(),
];
const config = {
root: root,
base: base,
define: define,
resolve: resolve,
plugins: plugins,
server: server,
build: build,
preview: preview,
};
const viteConfig = defineConfig(config);
export default viteConfig;