react-scripts-custom

Configuration and scripts for Create React App. Actual fork for custom settings.

Usage no npm install needed!

<script type="module">
  import reactScriptsCustom from 'https://cdn.skypack.dev/react-scripts-custom';
</script>

README

react-scripts-custom

It is a fork of react-scripts package, which allows you to make an injection of your custom settings in the webpack or replace Babel settings. Fork had to do after the maintainer of Create React App package rejected this PR. This package contains all the changes of react-scripts from version to version.

This package is contained in react-scripts-custom branch of main repo fork.

Examples

Start with create-react-app

npm install --global create-react-app
create-react-app my-app --scripts-version react-scripts-custom

Start without create-react-app

npm install --global create-react-app

In package.json:

{
  "scripts": {
    "start": "BABEL_REPLACE=.custom.babelrc WEBPACK_MERGE=custom.js react-scripts-custom start",
    "build": "BABEL_REPLACE=.custom.babelrc WEBPACK_MERGE=custom.js react-scripts-custom build",
    "test": "react-scripts-custom test --env=jsdom",
    "eject": "react-scripts-custom eject"
  }
}

Supported env variables:

  • BABEL_REPLACE — Replace Babel config
  • WEBPACK_MERGE — Merge your webpack cinfig to preinstall webpack config
  • WEBPACK_REPLACE — Replace webpack config

Original readme

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