This repository was archived by the owner on Apr 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,19 @@ const {
1212} = require ( '../utils/cliHandler' ) ;
1313const { getReactScriptsVersion, isEjected } = require ( '../utils' ) ;
1414
15- const { major, minor, patch } = getReactScriptsVersion ( reactScriptsVersion ) ;
15+ const { major, minor, patch, concatenatedVersion } = getReactScriptsVersion ( reactScriptsVersion ) ;
1616
1717const paths = isEjected ? importCwd ( './config/paths' ) : importCwd ( 'react-scripts/config/paths' ) ;
1818const webpack = importCwd ( 'webpack' ) ;
1919
2020const config =
21- major >= 2 && minor >= 1 && patch >= 2
21+ Number ( concatenatedVersion ) >= 212
2222 ? ( isEjected
2323 ? importCwd ( './config/webpack.config' )
2424 : importCwd ( 'react-scripts/config/webpack.config' ) ) ( 'development' )
2525 : isEjected
26- ? importCwd ( './config/webpack.config.dev' )
27- : importCwd ( 'react-scripts/config/webpack.config.dev' ) ;
26+ ? importCwd ( './config/webpack.config.dev' )
27+ : importCwd ( 'react-scripts/config/webpack.config.dev' ) ;
2828
2929const HtmlWebpackPlugin = importCwd ( 'html-webpack-plugin' ) ;
3030const InterpolateHtmlPlugin = importCwd ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
@@ -99,8 +99,7 @@ spinner.start('Clear destination folder');
9999
100100let inProgress = false ;
101101
102- fs
103- . emptyDir ( paths . appBuild )
102+ fs . emptyDir ( paths . appBuild )
104103 . then ( ( ) => {
105104 spinner . succeed ( ) ;
106105
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const DEFAULT_VERSION = {
99 major : 2 ,
1010 minor : 1 ,
1111 patch : 2 ,
12+ concatenatedVersion : '212' ,
1213} ;
1314
1415exports . isEjected = fs . pathExistsSync ( path . join ( process . cwd ( ) , 'config/paths.js' ) ) ;
@@ -19,6 +20,9 @@ exports.getReactScriptsVersion = function getReactScriptsVersion(cliVersion) {
1920 major : Number ( semver . major ( cliVersion ) ) ,
2021 minor : Number ( semver . minor ( cliVersion ) ) ,
2122 patch : Number ( semver . patch ( cliVersion ) ) ,
23+ concatenatedVersion : `${ semver . major ( cliVersion ) } ${ semver . minor ( cliVersion ) } ${ semver . patch (
24+ cliVersion
25+ ) } `,
2226 } ;
2327 return versions ;
2428 }
@@ -33,6 +37,7 @@ exports.getReactScriptsVersion = function getReactScriptsVersion(cliVersion) {
3337 major : Number ( semver . major ( version ) ) ,
3438 minor : Number ( semver . minor ( version ) ) ,
3539 patch : Number ( semver . patch ( version ) ) ,
40+ concatenatedVersion : `${ semver . major ( version ) } ${ semver . minor ( version ) } ${ semver . patch ( version ) } ` ,
3641 } ;
3742 return versions ;
3843} ;
You can’t perform that action at this time.
0 commit comments