Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-dev-utils

Package Overview
Dependencies
Maintainers
5
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dev-utils

webpack utilities used by Create React App

  • 11.0.0-next.96
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.2M
decreased by-9.44%
Maintainers
5
Weekly downloads
 
Created

What is react-dev-utils?

The react-dev-utils package provides a set of utilities designed to enhance the development experience of building React applications, especially when used in conjunction with Create React App. These utilities include webpack configuration helpers, development server helpers, and an assortment of other small utilities designed to make common tasks more convenient.

What are react-dev-utils's main functionalities?

Interacting with Webpack

This feature allows developers to interact with Webpack more easily, for example, by choosing a port for the development server. The code sample demonstrates how to use the `choosePort` function to select a port for running the development server.

const { choosePort } = require('react-dev-utils/WebpackDevServerUtils');
choosePort('localhost', 3000).then(port => console.log(`Port selected: ${port}`));

Formatting Webpack Messages

This utility helps in formatting the output of Webpack messages to be more readable. The code sample shows how to format raw Webpack messages into a more digestible format, separating out errors and warnings.

const { formatWebpackMessages } = require('react-dev-utils/formatWebpackMessages');
const rawMessages = webpackCompiler.run();
const messages = formatWebpackMessages(rawMessages);
console.log(messages.errors); console.log(messages.warnings);

Opening Browser

This feature provides a simple way to programmatically open the developer's browser to a specified URL, which is particularly useful when starting a development server. The code sample demonstrates opening the default browser to 'http://localhost:3000'.

const { openBrowser } = require('react-dev-utils/openBrowser');
openBrowser('http://localhost:3000');

Other packages similar to react-dev-utils

FAQs

Package last updated on 16 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc