FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cloudstack-primate/vue.config.js at master · apache/cloudstack-primate · GitHub
This repository was archived by the owner on Jan 20, 2021. It is now read-only.
apache
cloudstack-primate
Repository navigation
Code
Issues
16
(16)
Pull requests
15
(15)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
cloudstack-primate
/
vue.config.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
179 lines (165 loc) · 4.84 KB
Breadcrumbs
cloudstack-primate
/
vue.config.js
Copy path
File metadata and controls
179 lines (165 loc) · 4.84 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
const
path
=
require
(
'path'
)
const
webpack
=
require
(
'webpack'
)
const
fs
=
require
(
'fs'
)
const
packageJson
=
fs
.
readFileSync
(
'./package.json'
)
const
version
=
JSON
.
parse
(
packageJson
)
.
version
||
'master'
const
createThemeColorReplacerPlugin
=
require
(
'./theme.config'
)
const
UglifyJsPlugin
=
require
(
'uglifyjs-webpack-plugin'
)
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
dir
)
}
// vue.config.js
const
vueConfig
=
{
publicPath
:
'./'
,
/*
Vue-cli3:
Crashed when using Webpack `import()` #2463
https://github.com/vuejs/vue-cli/issues/2463
*/
/*
pages: {
index: {
entry: 'src/main.js',
chunks: ['chunk-vendors', 'chunk-common', 'index']
}
},
*/
configureWebpack
:
{
plugins
:
[
// Ignore all locale files of moment.js
new
webpack
.
IgnorePlugin
(
/
^
\.
\/
l
o
c
a
l
e
$
/
,
/
m
o
m
e
n
t
$
/
)
,
new
webpack
.
IgnorePlugin
(
/
@
a
n
t
v
\/
g
2
/
)
,
new
webpack
.
DefinePlugin
(
{
'process.env'
:
{
PACKAGE_VERSION
:
'"'
+
version
+
'"'
}
}
)
]
,
optimization
:
{
minimizer
:
[
new
UglifyJsPlugin
(
{
cache
:
true
,
parallel
:
true
,
uglifyOptions
:
{
compress
:
false
,
ecma
:
6
,
mangle
:
true
}
,
sourceMap
:
true
}
)
]
,
splitChunks
:
{
cacheGroups
:
{
commons
:
{
test
:
/
[
\\
/
]
n
o
d
e
_
m
o
d
u
l
e
s
[
\\
/
]
/
,
name
:
'vendors'
,
chunks
:
'all'
}
}
}
}
}
,
chainWebpack
:
(
config
)
=>
{
config
.
resolve
.
alias
.
set
(
'@public'
,
resolve
(
'public'
)
)
.
set
(
'@$'
,
resolve
(
'src'
)
)
.
set
(
'@api'
,
resolve
(
'src/api'
)
)
.
set
(
'@assets'
,
resolve
(
'src/assets'
)
)
.
set
(
'@comp'
,
resolve
(
'src/components'
)
)
.
set
(
'@views'
,
resolve
(
'src/views'
)
)
.
set
(
'@layout'
,
resolve
(
'src/layout'
)
)
.
set
(
'@static'
,
resolve
(
'src/static'
)
)
// do not emit errors as a warning
config
.
module
.
rule
(
'eslint'
)
.
use
(
'eslint-loader'
)
.
tap
(
opts
=>
(
{
...
opts
,
emitWarning
:
false
}
)
)
const
svgRule
=
config
.
module
.
rule
(
'svg'
)
svgRule
.
uses
.
clear
(
)
svgRule
.
oneOf
(
'inline'
)
.
resourceQuery
(
/
i
n
l
i
n
e
/
)
.
use
(
'vue-svg-icon-loader'
)
.
loader
(
'vue-svg-icon-loader'
)
.
end
(
)
.
end
(
)
.
oneOf
(
'external'
)
.
use
(
'file-loader'
)
.
loader
(
'file-loader'
)
.
options
(
{
name
:
'assets/[name].[hash:8].[ext]'
}
)
/* svgRule.oneOf('inline')
.resourceQuery(/inline/)
.use('vue-svg-loader')
.loader('vue-svg-loader')
.end()
.end()
.oneOf('external')
.use('file-loader')
.loader('file-loader')
.options({
name: 'assets/[name].[hash:8].[ext]'
})
*/
}
,
css
:
{
loaderOptions
:
{
less
:
{
modifyVars
:
{
// https://ant.design/docs/spec/colors
// https://vue.ant.design/docs/vue/customize-theme/
}
,
javascriptEnabled
:
true
}
}
}
,
devServer
:
{
port
:
5050
,
proxy
:
{
'/client'
:
{
target
:
process
.
env
.
CS_URL
||
'http://localhost:8080'
,
secure
:
false
,
ws
:
false
,
changeOrigin
:
true
,
proxyTimeout
:
10
*
60
*
1000
// 10 minutes
}
}
,
https
:
process
.
env
.
HTTPS_KEY
?
{
key
:
process
.
env
.
HTTPS_KEY
?
fs
.
readFileSync
(
process
.
env
.
HTTPS_KEY
)
:
undefined
,
cert
:
process
.
env
.
HTTPS_CERT
?
fs
.
readFileSync
(
process
.
env
.
HTTPS_CERT
)
:
undefined
,
ca
:
process
.
env
.
HTTPS_CA
?
fs
.
readFileSync
(
process
.
env
.
HTTPS_CA
)
:
undefined
,
dhparam
:
process
.
env
.
HTTPS_DHPARAM
?
fs
.
readFileSync
(
process
.
env
.
HTTPS_DHPARAM
)
:
undefined
}
:
false
,
public
:
process
.
env
.
PUBLIC_HOST
||
undefined
,
allowedHosts
:
process
.
env
.
ALLOWED_HOSTS
?
JSON
.
parse
(
process
.
env
.
ALLOWED_HOSTS
)
:
undefined
}
,
lintOnSave
:
undefined
,
// babel-loader no-ignore node_modules/*
transpileDependencies
:
[
]
,
pluginOptions
:
{
i18n
:
{
locale
:
'en'
,
fallbackLocale
:
'en'
,
localeDir
:
'locales'
,
enableInSFC
:
true
}
}
}
vueConfig
.
configureWebpack
.
plugins
.
push
(
createThemeColorReplacerPlugin
(
)
)
module
.
exports
=
vueConfig
Back
|
FazBrowse Home
|
New Git URL