Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !5429

Add --silent option to build command (#5029)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/lukasgjetting/master into master Oct 14, 2018
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: lukasgjetting

This adds a --silent option to the react-scripts build command.

When using the --silent option neither file sizes nor hosting instructions will be logged.

This is useful when building remotely, as the current amount of "unnecessary" information can really clog the output.

Test plan

  1. Run react-scripts build and see that it prints the same information as before
$ yarn build
yarn run v1.6.0
$ react-scripts build
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  207.02 KB  build\static\js\1.6875191b.chunk.js
  12.55 KB   build\static\js\main.d7e743ce.chunk.js
  2.76 KB    build\static\css\main.fba159f8.chunk.css
  2 KB       build\static\css\1.5d61c275.chunk.css
  763 B      build\static\js\runtime~main.229c360f.js

The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:

  "homepage" : "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

Find out more about deployment here:

  http://bit.ly/CRA-deploy

Done in 67.75s.
  1. Run react-scripts build --silent and see that it doesn't print the information specified above
$ yarn build:silent
yarn run v1.6.0
$ react-scripts --silent
Creating an optimized production build...
Compiled successfully.

Done in 17.63s.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/lukasgjetting/master