FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Scriptis/vue.config.js at master · WeBankFinTech/Scriptis · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
WeBankFinTech
/
Scriptis
Public
Notifications
You must be signed in to change notification settings
Fork
263
Star
814
Code
Issues
21
Pull requests
4
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Scriptis
/
vue.config.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
58 lines (56 loc) · 1.9 KB
Breadcrumbs
Scriptis
/
vue.config.js
Copy path
File metadata and controls
58 lines (56 loc) · 1.9 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
// vue.config.js
let
CopyWebpackPlugin
=
require
(
'copy-webpack-plugin'
)
let
FileManagerPlugin
=
require
(
'filemanager-webpack-plugin'
)
;
let
path
=
require
(
'path'
)
let
fs
=
require
(
'fs'
)
;
const
getVersion
=
(
)
=>
{
const
pkgPath
=
path
.
join
(
__dirname
,
'./package.json'
)
;
let
pkg
=
fs
.
readFileSync
(
pkgPath
)
;
pkg
=
JSON
.
parse
(
pkg
)
;
return
pkg
.
version
;
}
module
.
exports
=
{
outputDir
:
'dist/dist'
,
chainWebpack
:
(
config
)
=>
{
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
config
.
plugin
(
'compress'
)
.
use
(
FileManagerPlugin
,
[
{
onEnd
:
{
copy
:
[
{
source
:
'node_modules/monaco-editor/dev/vs'
,
destination
:
`./dist/dist/static/vs`
}
,
{
source
:
'./config.sh'
,
destination
:
`./dist`
}
,
{
source
:
'./install.sh'
,
destination
:
`./dist`
}
]
,
// 先删除根目录下的zip包
delete
:
[
`./wedatasphere-scriptis-
${
getVersion
(
)
}
-dist.zip`
]
,
// 将dist文件夹下的文件进行打包
archive
:
[
{
source
:
'./dist'
,
destination
:
`./wedatasphere-scriptis-
${
getVersion
(
)
}
-dist.zip`
}
,
]
}
,
}
]
)
}
}
,
configureWebpack
:
{
resolve
:
{
alias
:
{
'vue$'
:
'vue/dist/vue.esm.js'
,
'@'
:
path
.
resolve
(
__dirname
,
'./src'
)
,
'@js'
:
path
.
resolve
(
__dirname
,
'./src/js'
)
,
'@assets'
:
path
.
resolve
(
__dirname
,
'./src/assets'
)
}
}
,
plugins
:
[
new
CopyWebpackPlugin
(
[
{
from
:
'node_modules/monaco-editor/dev/vs'
,
to
:
'static/vs'
,
}
]
)
,
]
}
,
// 选项...
pluginOptions
:
{
mock
:
{
entry
:
'mock.js'
,
power
:
false
}
}
}
Back
|
FazBrowse Home
|
New Git URL