Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-website-ssr-template
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
liguokang
xiaomai-website-ssr-template
Commits
7e130729
Commit
7e130729
authored
Jul 29, 2021
by
liguokang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
🎨
parent
274c6545
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
common/webConfigs.js
+30
-0
next.config.js
+2
-1
script.js
+7
-2
No files found.
common/webConfigs.js
0 → 100644
View file @
7e130729
/*
* @Author: liguokang
* @Date: 2021-07-29 16:19:43
* @LastEditors: liguokang
* @LastEditTime: 2021-07-29 16:37:35
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
const
DEPLOY_ENV
=
process
.
env
.
DEPLOY_ENV
;
console
.
log
(
DEPLOY_ENV
,
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
);
const
webDomain
=
{
dev
:
'https://dev.xiaomai5.com/'
,
rc
:
'https://rc.xiaomai5.com/'
,
gray
:
'https://rc.xiaomai5.com/'
,
prod
:
'https://www.xiaomai5.com/'
,
};
const
apiDomain
=
{
dev
:
'https://dev-heimdall.xiaomai5.com/'
,
rc
:
'https://rc-heimdall.xiaomai5.com/'
,
gray
:
'https://gray-heimdall.xiaomai5.com/'
,
prod
:
'https://heimdall.xiaomai5.com/'
,
};
exports
.
DOMAIN
=
{
webDomain
:
webDomain
[
DEPLOY_ENV
],
apiDomain
:
apiDomain
[
DEPLOY_ENV
],
};
next.config.js
View file @
7e130729
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: liguokang
* @Author: liguokang
* @Date: 2021-07-14 20:36:28
* @Date: 2021-07-14 20:36:28
* @LastEditors: liguokang
* @LastEditors: liguokang
* @LastEditTime: 2021-07-29 16:
05:28
* @LastEditTime: 2021-07-29 16:
34:27
* @Description:
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -33,6 +33,7 @@ module.exports = withLessExcludeAntd({
...
@@ -33,6 +33,7 @@ module.exports = withLessExcludeAntd({
config
.
resolve
.
alias
[
'@'
]
=
path
.
join
(
__dirname
,
'common'
);
config
.
resolve
.
alias
[
'@'
]
=
path
.
join
(
__dirname
,
'common'
);
config
.
resolve
.
alias
[
'components'
]
=
path
.
join
(
__dirname
,
'components'
);
config
.
resolve
.
alias
[
'components'
]
=
path
.
join
(
__dirname
,
'components'
);
config
.
resolve
.
alias
[
'static'
]
=
path
.
join
(
__dirname
,
'static'
);
config
.
resolve
.
alias
[
'static'
]
=
path
.
join
(
__dirname
,
'static'
);
config
.
plugins
.
push
(
config
.
plugins
.
push
(
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'process.env'
:
{
'process.env'
:
{
...
...
script.js
View file @
7e130729
...
@@ -2,15 +2,20 @@
...
@@ -2,15 +2,20 @@
* @Author: liguokang
* @Author: liguokang
* @Date: 2021-07-29 16:14:30
* @Date: 2021-07-29 16:14:30
* @LastEditors: liguokang
* @LastEditors: liguokang
* @LastEditTime: 2021-07-29 16:
16:46
* @LastEditTime: 2021-07-29 16:
37:00
* @Description:
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
*/
const
fs
=
require
(
'fs'
);
const
fs
=
require
(
'fs'
);
const
webConfigs
=
require
(
'./common/webConfigs'
);
const
readStream
=
fs
.
createReadStream
(
'./sitemap/sitemap.html'
,
{
encoding
:
'utf8'
});
const
readStream
=
fs
.
createReadStream
(
'./sitemap/sitemap.html'
,
{
encoding
:
'utf8'
});
const
writeStream
=
fs
.
createWriteStream
(
'./dist/sitemap.html'
,
{
encoding
:
'utf8'
});
const
writeStream
=
fs
.
createWriteStream
(
'./dist/sitemap.html'
,
{
encoding
:
'utf8'
});
console
.
log
(
webConfigs
,
'11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
);
console
.
log
(
process
.
env
.
DEPLOY_ENV
);
console
.
log
(
process
.
env
.
DEPLOY_ENV
);
let
env
=
{
let
env
=
{
dev
:
'https://dev.xiaomai5.com/'
,
dev
:
'https://dev.xiaomai5.com/'
,
rc
:
'https://rc.xiaomai5.com/'
,
rc
:
'https://rc.xiaomai5.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