New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-scripts-rewired

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scripts-rewired

Extend create-react-app 3.x as you used to do in react-app-rewired!

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
176
increased by12.82%
Maintainers
1
Weekly downloads
 
Created
Source

react-scripts-rewired

This fork exists to bring back the basic functionality of react-app-rewired in a simple and non intrusive way.
I do my best to keep this fork up-to-date and to inject as little custom code as possible.

This package includes scripts and configuration used by Create React App.
Please refer to its documentation:

  • Getting Started – How to create a new app.
  • User Guide – How to develop apps bootstrapped with Create React App.

Quick Start

npx create-react-app project-name --scripts-version react-scripts-rewired

Extend Webpack config

In your project's root you'll find webpack.config.extend.js which contains a simple function that could mutate the webpack configuration that is provided by create-react-app.

module.exports = (webpackConfig, env, { paths }) => {
    webpackConfig = rewireEslint(webpackConfig)
    return webpackConfig
}

Compatible Rewire Libraries:

Extend Webpack DevServer config

The very same concept and signature is applied to the webpackDevServer.config.extend.js.

Custom App Template

You can create your own app template as .cra-template/ and place it in the folder in which you are going to create your new app.

If you want to specify a custom template folder to use, there is what I believe to be a temporary CLI option that will make CRA to use a local template:

create-react-app \
    project-name \
    --scripts-version react-scripts-rewired \
    --internal-testing-template my-custom-template

Existing Templates

This custom fork of react-scripts comes with a couple of specific templates that might come in handy to bootstrap a new project:

  • barebone: plain folder to start with, no existing code.
  • fullstack: radium, redux, react-router, express, graphql client, ssr, ... (under construction)

FAQs

Package last updated on 21 Aug 2019

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