Question · JavaScript and React course · Module 8: Advanced React Patterns

npm run build

What does the npm run build command do in a React project?

Answer options

  • Starts a development server with hot reloading
  • Installs all dependencies from package.json
  • Runs the project's unit tests
  • Creates an optimized production build with minification, code splitting, and tree shaking

You can check the correct answer by solving this task in the CodeWorlds game.