Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
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
sunyihao
bkunyun
Commits
350ec0d8
Commit
350ec0d8
authored
Jun 10, 2022
by
吴永生#A02208
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: build修改
parent
0132e94f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
+21
-12
package.json
package.json
+5
-5
build-release-cn.js
scripts/build-release-cn.js
+11
-4
build.js
scripts/build.js
+5
-3
No files found.
package.json
View file @
350ec0d8
...
@@ -89,11 +89,11 @@
...
@@ -89,11 +89,11 @@
"start:release-cn"
:
"set
\"
REACT_APP_ENV=release-cn
\"
&& npm start"
,
"start:release-cn"
:
"set
\"
REACT_APP_ENV=release-cn
\"
&& npm start"
,
"start:release-en"
:
"set
\"
REACT_APP_ENV=release-en
\"
&& npm start"
,
"start:release-en"
:
"set
\"
REACT_APP_ENV=release-en
\"
&& npm start"
,
"start"
:
"node scripts/start.js"
,
"start"
:
"node scripts/start.js"
,
"build:master"
:
"
set
\"
REACT_APP_ENV=master
\"
&&
node --max-old-space-size=6144 scripts/build-master.js"
,
"build:master"
:
"node --max-old-space-size=6144 scripts/build-master.js"
,
"build:dev-cn"
:
"
set
\"
REACT_APP_ENV=dev-cn
\"
&&
node --max-old-space-size=6144 scripts/build-dev-cn.js"
,
"build:dev-cn"
:
"node --max-old-space-size=6144 scripts/build-dev-cn.js"
,
"build:dev-en"
:
"
set
\"
REACT_APP_ENV=dev-en
\"
&&
node --max-old-space-size=6144 scripts/build-dev-en.js"
,
"build:dev-en"
:
"node --max-old-space-size=6144 scripts/build-dev-en.js"
,
"build:release-cn"
:
"
set
\"
REACT_APP_ENV=release-cn
\"
&&
node --max-old-space-size=6144 scripts/build-release-cn.js"
,
"build:release-cn"
:
"node --max-old-space-size=6144 scripts/build-release-cn.js"
,
"build:release-en"
:
"
set
\"
REACT_APP_ENV=release-en
\"
&&
node --max-old-space-size=6144 scripts/build-release-en.js"
,
"build:release-en"
:
"node --max-old-space-size=6144 scripts/build-release-en.js"
,
"build"
:
"node scripts/build.js"
,
"build"
:
"node scripts/build.js"
,
"test"
:
"node scripts/test.js"
"test"
:
"node scripts/test.js"
},
},
...
...
scripts/build-release-cn.js
View file @
350ec0d8
const
build
=
require
(
"./build"
)
/*
process
.
env
.
REACT_APP_ENV
=
'release-cn'
;
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
build
()
* @Date: 2022-06-10 10:18:28
\ No newline at end of file
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-10 13:55:43
* @FilePath: /bkunyun/scripts/build-release-cn.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const
build
=
require
(
"./build"
);
process
.
env
.
REACT_APP_ENV
=
"release-cn"
;
build
();
scripts/build.js
View file @
350ec0d8
...
@@ -52,7 +52,8 @@ const config = configFactory("production");
...
@@ -52,7 +52,8 @@ const config = configFactory("production");
// We require that you explicitly set browsers and do not fall back to
// We require that you explicitly set browsers and do not fall back to
// browserslist defaults.
// browserslist defaults.
const
{
checkBrowsers
}
=
require
(
"react-dev-utils/browsersHelper"
);
const
{
checkBrowsers
}
=
require
(
"react-dev-utils/browsersHelper"
);
checkBrowsers
(
paths
.
appPath
,
isInteractive
)
function
build
()
{
checkBrowsers
(
paths
.
appPath
,
isInteractive
)
.
then
(()
=>
{
.
then
(()
=>
{
// First, read the current file sizes in build directory.
// First, read the current file sizes in build directory.
// This lets us display how much they changed later.
// This lets us display how much they changed later.
...
@@ -65,7 +66,7 @@ checkBrowsers(paths.appPath, isInteractive)
...
@@ -65,7 +66,7 @@ checkBrowsers(paths.appPath, isInteractive)
// Merge with the public folder
// Merge with the public folder
copyPublicFolder
();
copyPublicFolder
();
// Start the webpack build
// Start the webpack build
return
build
(
previousFileSizes
);
return
build1
(
previousFileSizes
);
})
})
.
then
(
.
then
(
({
stats
,
previousFileSizes
,
warnings
})
=>
{
({
stats
,
previousFileSizes
,
warnings
})
=>
{
...
@@ -130,9 +131,10 @@ checkBrowsers(paths.appPath, isInteractive)
...
@@ -130,9 +131,10 @@ checkBrowsers(paths.appPath, isInteractive)
}
}
process
.
exit
(
1
);
process
.
exit
(
1
);
});
});
}
// Create the production build and print the deployment instructions.
// Create the production build and print the deployment instructions.
function
build
(
previousFileSizes
)
{
function
build
1
(
previousFileSizes
)
{
console
.
log
(
"Creating an optimized production build..."
);
console
.
log
(
"Creating an optimized production build..."
);
const
compiler
=
webpack
(
config
);
const
compiler
=
webpack
(
config
);
...
...
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