Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fe-app-h5
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
万亚飞
fe-app-h5
Commits
4fa7588e
Commit
4fa7588e
authored
Jun 12, 2019
by
万亚飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config
parent
ee786471
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
webpack.dev.js
build/webpack.dev.js
+1
-1
webpack.prod.js
build/webpack.prod.js
+2
-2
dev.env.js
config/dev.env.js
+4
-4
production.env.js
config/production.env.js
+4
-4
testing.env.js
config/testing.env.js
+4
-4
No files found.
build/webpack.dev.js
View file @
4fa7588e
...
@@ -104,7 +104,7 @@ module.exports = merge(base, {
...
@@ -104,7 +104,7 @@ module.exports = merge(base, {
},
},
plugins
:
[
plugins
:
[
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'process.env'
:
env
'process.env'
:
JSON
.
stringify
(
env
)
}),
}),
new
HtmlWebpackPlugin
({
new
HtmlWebpackPlugin
({
template
:
resolveRoot
(
'index.html'
)
template
:
resolveRoot
(
'index.html'
)
...
...
build/webpack.prod.js
View file @
4fa7588e
...
@@ -13,7 +13,7 @@ const merge = require('webpack-merge');
...
@@ -13,7 +13,7 @@ const merge = require('webpack-merge');
const
base
=
require
(
'./webpack.base.js'
);
const
base
=
require
(
'./webpack.base.js'
);
const
env
=
require
(
`../config/
${
process
.
env
.
ENV_MARK
}
.env`
);
const
env
=
require
(
`../config/
${
process
.
env
.
ENV_MARK
}
.env`
);
console
.
log
(
'env'
,
env
.
NODE_ENV
);
const
os
=
require
(
'os'
);
const
os
=
require
(
'os'
);
function
resolveRoot
(
dir
)
{
function
resolveRoot
(
dir
)
{
return
path
.
join
(
__dirname
,
'..'
,
dir
);
return
path
.
join
(
__dirname
,
'..'
,
dir
);
...
@@ -147,7 +147,7 @@ module.exports = merge(base, {
...
@@ -147,7 +147,7 @@ module.exports = merge(base, {
},
},
plugins
:
[
plugins
:
[
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'process.env'
:
env
'process.env'
:
JSON
.
stringify
(
env
)
}),
}),
new
HtmlWebpackPlugin
({
new
HtmlWebpackPlugin
({
template
:
resolveRoot
(
'index.html'
),
template
:
resolveRoot
(
'index.html'
),
...
...
config/dev.env.js
View file @
4fa7588e
//开发环境
//开发环境
module
.
exports
=
{
module
.
exports
=
{
NODE_ENV
:
'
"development"
'
,
NODE_ENV
:
'
development
'
,
ENV_MARK
:
'
"development"
'
,
ENV_MARK
:
'
development
'
,
prefix
:
'
"https://testapi.ydl.com/api"
'
,
prefix
:
'
https://testapi.ydl.com/api
'
,
prefixH2
:
'
"https//testh2.yidianling.com"
'
prefixH2
:
'
https//testh2.yidianling.com
'
};
};
config/production.env.js
View file @
4fa7588e
module
.
exports
=
{
module
.
exports
=
{
NODE_ENV
:
'
"production"
'
,
NODE_ENV
:
'
production
'
,
ENV_MARK
:
'
"production"
'
,
ENV_MARK
:
'
production
'
,
prefix
:
'
"https://api.ydl.com/api"
'
,
prefix
:
'
https://api.ydl.com/api
'
,
prefixH2
:
'
"https://h2.yidianling.com"
'
prefixH2
:
'
https://h2.yidianling.com
'
};
};
config/testing.env.js
View file @
4fa7588e
module
.
exports
=
{
module
.
exports
=
{
NODE_ENV
:
'
"production"
'
,
NODE_ENV
:
'
production
'
,
ENV_MARK
:
'
"testing"
'
,
ENV_MARK
:
'
testing
'
,
prefix
:
'
"https://testapi.ydl.com/api"
'
,
prefix
:
'
https://testapi.ydl.com/api
'
,
prefixH2
:
'
"https//testh2.yidianling.com"
'
prefixH2
:
'
https//testh2.yidianling.com
'
};
};
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