-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
67 lines (66 loc) · 1.56 KB
/
Copy pathvite.config.ts
File metadata and controls
67 lines (66 loc) · 1.56 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
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue2';
import path from 'path';
import fs from 'fs';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue()
],
resolve: {
alias: {
'@': path.resolve(__dirname, './front_src'),
},
extensions: ['.ts', '.tsx', '.js', '.vue', '.json']
},
css: {
preprocessorOptions: {
less: {
// Only inject mixins and variables (no actual CSS output)
additionalData: `@import "${path.resolve(__dirname, 'front_src/less/_mixins.less')}";@import "${path.resolve(__dirname, 'front_src/less/_variables.less')}";`,
javascriptEnabled: true
}
}
},
define: {
'process.env': {},
global: 'globalThis',
},
build: {
outDir: 'dist',
sourcemap: true,
minify: false, // Avoid minifying to prevent breaking share meta
rollupOptions: {
output: {
manualChunks: undefined
}
}
},
server: {
https: fs.existsSync('./multiblindtest.local-key.pem') ? {
key: fs.readFileSync('./multiblindtest.local-key.pem'),
cert: fs.readFileSync('./multiblindtest.local.pem')
} : undefined,
host: '127.0.0.1',
port: 8080,
strictPort: true,
hmr: {
host: 'multiblindtest.local',
protocol: fs.existsSync('./multiblindtest.local-key.pem') ? 'wss' : 'ws',
port: 8080
}
},
optimizeDeps: {
include: [
'vue',
'vue-router',
'vuex',
'vue-i18n',
'gsap',
'sockjs-client',
'tmi.js',
'fuse.js'
],
exclude: []
}
});