forked from hwameistor/hwameistor-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
72 lines (67 loc) · 1.64 KB
/
vue.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const { defineConfig } = require('@vue/cli-service');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const daoStyleUnpluginExtend = require('@dao-style/unplugin-extend/webpack');
const groupMapping = require('@dao-style/extend/dist/group-mapping.json');
module.exports = defineConfig({
publicPath: process.env.VUE_APP_PUBLIC_BASE_PATH,
chainWebpack: (config) => {
config
.plugin('html')
.tap((args) => {
// eslint-disable-next-line no-param-reassign
args[0].title = 'HwameiStor';
return args;
});
},
transpileDependencies: true,
configureWebpack: {
plugins: [
new MonacoWebpackPlugin({
languages: ['yaml'],
customLanguages: [
{
label: 'yaml',
entry: 'monaco-yaml',
worker: {
id: 'monaco-yaml/yamlWorker',
entry: 'monaco-yaml/yaml.worker',
},
},
],
}),
daoStyleUnpluginExtend({
mapping: groupMapping,
}),
],
optimization: {
splitChunks: {
chunks: 'all',
cacheGroups: {
'dao-style': {
chunks: 'all',
name: 'chunk-daoStyle',
test: /[\\/]node_modules[\\/]@dao-style[\\/]/,
},
},
},
},
},
pluginOptions: {
i18n: {
locale: 'en-US',
fallbackLocale: 'en-US',
localeDir: 'locales',
enableLegacy: false,
runtimeOnly: false,
compositionOnly: false,
fullInstall: false,
},
},
devServer: {
proxy: {
'^/apis': {
target: process.env.VUE_APP_API_URL,
},
},
},
});