🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

react-dev-utils

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
c

react-dev-utils

Webpack utilities used by Create React App

5.0.3
99

Supply Chain Security

96

Vulnerability

100

Quality

83

Maintenance

100

License

Medium CVE

Vulnerability

Contains a medium severity Common Vulnerability and Exposure (CVE).

Found 1 instance in 1 package

Network access

Supply chain risk

This module accesses the network.

Found 1 instance in 1 package

Dependencies have 11 high and critical alerts.

Critical CVE, Socket optimized override available, and High CVE

Version published
Weekly downloads
5.3M
-0.57%
Maintainers
3
Weekly downloads
 
Created
Issues
2319

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 14 Oct 2018

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