forked from emqx/emqx-dashboard5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
42 lines (40 loc) · 926 Bytes
/
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
/* eslint-disable @typescript-eslint/no-var-requires */
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
const { HOST_URL } = process.env
const target = HOST_URL || 'http://localhost:18083/'
module.exports = {
devServer: {
port: 7000,
proxy: {
'/api/v5': {
target,
changeOrigin: true,
},
},
},
css: {
requireModuleExtension: true,
},
assetsDir: 'static',
publicPath: './',
productionSourceMap: false,
configureWebpack: {
plugins: [
new MonacoWebpackPlugin({
languages: ['javascript', 'json', 'sql', 'plaintext'],
globalAPI: true,
}),
],
},
chainWebpack: (config) => {
config.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
monacoEditor: {
name: 'chunk-monaco-editor',
test: /[\\/]node_modules[\\/]monaco-editor[\\/]/,
},
},
})
},
}