@jdcrensh/react-scripts
TypeScript icon, indicating that this package has built-in type declarations

5.0.2-0 • Public • Published

react-scripts

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

Configuration & Plugin Support (unofficial)

This is an unofficial fork that extends Create React App with an interface for plugins and custom config.

If a cra.config.js plugin doesn't exist, there's no difference than if you were using the official package.

Configuration

An ES5 module exported by cra.config.js at the app's root is used for configuration. Each property is optional.

Property Type Description
[plugins] array plugin references or names. default: []
[apply] function webpack config. default: identity function
[babel] function babel config. default: identity function

Example

module.exports = {
  // Load plugins by name and/or by reference. Loading plugins by name is for
  // convenience, eg. `'css-modules'` is the same as `require('react-scripts-plugin-css-modules')`
  plugins: ['no-minify', require('./my-internal-plugin')],

  // Webpack configuration
  apply: (config, { env, paths }) => {
    return config;
  },

  // Babel configuration
  babel: (config, { env, paths }) => {
    return config;
  },
};

Plugins

A plugin is simply an exported custom config without the plugins property.

Available Plugins

Dependents (0)

Package Sidebar

Install

npm i @jdcrensh/react-scripts

Weekly Downloads

2

Version

5.0.2-0

License

MIT

Unpacked Size

121 kB

Total Files

28

Last publish

Collaborators

  • jdcrensh