Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
max_android_panel
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xin
max_android_panel
Commits
9c449c70
Commit
9c449c70
authored
May 23, 2019
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
d7681837
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
3 deletions
+35
-3
client/env/development.js
+2
-1
client/env/production.js
+2
-1
client/env/test.js
+2
-1
webpack.config.js
+29
-0
No files found.
client/env/development.js
View file @
9c449c70
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
*/
*/
module
.
exports
=
{
module
.
exports
=
{
domain
:
'https://test.mjitech.com/web/'
,
domain
:
'https://test.mjitech.com/web/'
,
uploadImg
:
'https://
preprod
.mjitech.com/static/uploadTrouble'
uploadImg
:
'https://
test
.mjitech.com/static/uploadTrouble'
}
}
\ No newline at end of file
client/env/production.js
View file @
9c449c70
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
*/
*/
module
.
exports
=
{
module
.
exports
=
{
domain
:
'https://www.mjitech.com/web/'
,
domain
:
'https://www.mjitech.com/web/'
,
uploadImg
:
"https://
preprod
.mjitech.com/static/uploadTrouble"
uploadImg
:
"https://
www
.mjitech.com/static/uploadTrouble"
}
}
\ No newline at end of file
client/env/test.js
View file @
9c449c70
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
*/
*/
module
.
exports
=
{
module
.
exports
=
{
domain
:
'https://test.mjitech.com/web/'
,
domain
:
'https://test.mjitech.com/web/'
,
uploadImg
:
'https://
preprod
.mjitech.com/static/uploadTrouble'
uploadImg
:
'https://
test
.mjitech.com/static/uploadTrouble'
}
}
\ No newline at end of file
webpack.config.js
View file @
9c449c70
...
@@ -118,6 +118,35 @@ let envConfig = {
...
@@ -118,6 +118,35 @@ let envConfig = {
]
]
},
},
'test'
:
{
output
:{
path
:
path
.
join
(
__dirname
,
'./static'
),
filename
:
'bundle-[hash:6].js'
},
plugins
:[
new
webpack
.
optimize
.
UglifyJsPlugin
(),
//js压缩
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
"vendor"
,
filename
:
"vendor.bundle.js"
}),
//分割共有模块和代码模块
new
webpack
.
optimize
.
AggressiveMergingPlugin
(),
new
webpack
.
DefinePlugin
({
'process.env'
:
{
NODE_ENV
:
JSON
.
stringify
(
'production'
),
PAD_ENV
:
JSON
.
stringify
(
'test'
)
},
'BASEREM'
:
120
,
'CURVERSION'
:
JSON
.
stringify
(
curversion
)
}),
new
webpack
.
ProvidePlugin
({
ENV
:
__dirname
+
(
'/client/env/test'
),
UTILPATH
:
__dirname
+
'/client/util/util'
,
CONFIG
:
__dirname
+
'/client/config/index'
,
}),
new
webpack
.
NoEmitOnErrorsPlugin
(),
//配置了NoErrorsPlugin插件,用来跳过编译时出错的代码并记录,使编译后运行时的包不会发生错误
]
},
'dev'
:{
'dev'
:{
output
:
{
output
:
{
path
:
path
.
join
(
__dirname
,
'./static'
),
path
:
path
.
join
(
__dirname
,
'./static'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment