diff --git a/packages/scripts/README.md b/packages/scripts/README.md index 8e0fae18b0f93..cc3f3b2b04a7c 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -38,7 +38,7 @@ _Example:_ ### `build` -Builds the code for production to the `build` folder. It correctly bundles code in production mode and optimizes the build for the best performance. Your code is ready to be deployed. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). +Builds the code to the designated `build` folder in the configuration file. It correctly bundles code in production mode and optimizes the build for the best performance. Your code is ready to be deployed. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). _Example:_ @@ -145,7 +145,7 @@ This is how you execute the script with presented setup: ### `start` -Builds the code for development to the `build` folder. The script will automatically rebuild if you make changes to the code. You will see the build errors in the console. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). +Builds the code for development to the designated `build` folder in the configuration file. The script will automatically rebuild if you make changes to the code. You will see the build errors in the console. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). _Example:_ diff --git a/packages/scripts/scripts/build.js b/packages/scripts/scripts/build.js index 025607bff0479..9470274f76633 100644 --- a/packages/scripts/scripts/build.js +++ b/packages/scripts/scripts/build.js @@ -13,8 +13,6 @@ const { hasProjectFile, } = require( '../utils' ); -const args = getCliArgs(); - const hasWebpackConfig = hasCliArg( '--config' ) || hasProjectFile( 'webpack.config.js' ) || hasProjectFile( 'webpack.config.babel.js' ); @@ -25,7 +23,7 @@ if ( hasWebpackConfig ) { const { status } = spawn( resolveBin( 'webpack' ), - [ ...args ], + getCliArgs(), { stdio: 'inherit' } ); process.exit( status ); diff --git a/packages/scripts/scripts/start.js b/packages/scripts/scripts/start.js index b425f2f6e3875..db42c33ba447f 100644 --- a/packages/scripts/scripts/start.js +++ b/packages/scripts/scripts/start.js @@ -13,8 +13,6 @@ const { hasProjectFile, } = require( '../utils' ); -const args = getCliArgs(); - const hasWebpackConfig = hasCliArg( '--config' ) || hasProjectFile( 'webpack.config.js' ) || hasProjectFile( 'webpack.config.babel.js' ); @@ -22,7 +20,7 @@ const hasWebpackConfig = hasCliArg( '--config' ) || if ( hasWebpackConfig ) { const { status } = spawn( resolveBin( 'webpack' ), - [ '--watch', ...args ], + [ '--watch', ...getCliArgs() ], { stdio: 'inherit' } ); process.exit( status );