Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
songxia-wxherr
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
songxia-wxherr
Commits
c4e4f22b
Commit
c4e4f22b
authored
Jun 15, 2017
by
夏彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改环境配置
parent
51b74bed
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
62 deletions
+90
-62
prod.js
config/prod.js
+1
-1
test.js
config/test.js
+24
-0
package.json
package.json
+3
-1
webpack.config.js
webpack.config.js
+62
-60
No files found.
config/prod.js
View file @
c4e4f22b
...
@@ -6,7 +6,7 @@ module.exports = {
...
@@ -6,7 +6,7 @@ module.exports = {
},
},
plugins
:
[
plugins
:
[
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
__BASE_URL__
:
JSON
.
stringify
(
'//
songxia.ibanshou.cn
/'
),
__BASE_URL__
:
JSON
.
stringify
(
'//
code.ibanshou.cn/songxia
/'
),
__SERVER_URL__
:
JSON
.
stringify
(
'//code.ibanshou.cn/'
),
__SERVER_URL__
:
JSON
.
stringify
(
'//code.ibanshou.cn/'
),
__QINIU_URL__
:
JSON
.
stringify
(
'http://img.2g.vgot.net/'
),
__QINIU_URL__
:
JSON
.
stringify
(
'http://img.2g.vgot.net/'
),
__NODE_ENV__
:
'"production"'
__NODE_ENV__
:
'"production"'
...
...
config/test.js
0 → 100644
View file @
c4e4f22b
var
webpack
=
require
(
'webpack'
);
module
.
exports
=
{
output
:
{
chunkFilename
:
'[name].[chunkhash].js'
},
plugins
:
[
new
webpack
.
DefinePlugin
({
__BASE_URL__
:
JSON
.
stringify
(
'//testweb.pp.cc/songxia/'
),
__SERVER_URL__
:
JSON
.
stringify
(
'//code.ibanshou.cn/'
),
__QINIU_URL__
:
JSON
.
stringify
(
'http://img.2g.vgot.net/'
),
__NODE_ENV__
:
'"test"'
}),
new
webpack
.
optimize
.
UglifyJsPlugin
({
compress
:
{
warnings
:
false
}
}),
new
webpack
.
LoaderOptionsPlugin
({
minimize
:
true
})
]
};
package.json
View file @
c4e4f22b
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
"dev"
:
"cross-env NODE_ENV=development webpack-dev-server --watch -d --progress --color --open"
,
"dev"
:
"cross-env NODE_ENV=development webpack-dev-server --watch -d --progress --color --open"
,
"build"
:
"cross-env NODE_ENV=production webpack --progress --hide-modules"
"test"
:
"cross-env NODE_ENV=test webpack --progress --hide-modules"
,
"prod"
:
"cross-env NODE_ENV=production webpack --progress --hide-modules"
},
},
"keywords"
:
[
"keywords"
:
[
"webpack"
"webpack"
...
...
webpack.config.js
View file @
c4e4f22b
...
@@ -9,6 +9,8 @@ var nodeEnv = process.env.NODE_ENV;
...
@@ -9,6 +9,8 @@ var nodeEnv = process.env.NODE_ENV;
if
(
nodeEnv
===
'production'
)
{
if
(
nodeEnv
===
'production'
)
{
var
env
=
require
(
'./config/prod.js'
);
var
env
=
require
(
'./config/prod.js'
);
}
else
if
(
nodeEnv
===
'test'
)
{
var
env
=
require
(
'./config/test.js'
);
}
else
{
}
else
{
var
env
=
require
(
'./config/dev.js'
);
var
env
=
require
(
'./config/dev.js'
);
}
}
...
@@ -60,7 +62,7 @@ var config = {
...
@@ -60,7 +62,7 @@ var config = {
}),
}),
new
CopyWebpackPlugin
([
new
CopyWebpackPlugin
([
// {from: __dirname + '/resource', to: 'resource'},
// {from: __dirname + '/resource', to: 'resource'},
{
from
:
'./src/libs/layer'
,
to
:
'layer'
},
{
from
:
'./src/libs/layer'
,
to
:
'layer'
},
{
from
:
'./src/img'
,
to
:
'img'
},
{
from
:
'./src/img'
,
to
:
'img'
},
{
from
:
'./src/libs/videojs/video-js.swf'
,
to
:
'videojs'
},
{
from
:
'./src/libs/videojs/video-js.swf'
,
to
:
'videojs'
},
{
from
:
'./src/libs/plupload'
,
to
:
'plupload'
}
{
from
:
'./src/libs/plupload'
,
to
:
'plupload'
}
...
...
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