extensible-react-scripts
Configuration and scripts for Create React App.
Last updated a year ago by brunolemos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install extensible-react-scripts 
SYNC missed versions from official npm registry.

Extensible React Scripts

react-scripts version: 1.1.0

Why?

The official react-scripts that is included in Create React App does not allow any custom webpack configuration, which leads to people using more eject than we wanted to.

Solution

Allow users to extend webpack configuration.

Usage

New projects

create-react-app APP_NAME_HERE --scripts-version extensible-react-scripts

Edit the cra.config.js file generated at the root of the project.

Existing projects

  • yarn remove react-scripts
  • yarn add --dev extensible-react-scripts
  • Create a file named cra.config.js at the root of the project (outside src folder) exporting a function like below:
cra.config.js example
module.exports = {
  webpack: function(webpackConfig, { isDevelopment }) {
    // modify webpack config here
    const config = Object.assign({}, webpackConfig)

    // return the modified version
    return config
  },
}

That's it!

Available configurations

Config Format Return type
paths function(paths, { isDevelopment, resolvePath }) Object
webpack function(webpackConfig, { isDevelopment, paths, resolvePath }) Object

Versioning

The version will be the same of the official react-scripts. Check package.json or the top of this file.

Related projects

https://github.com/timarney/react-app-rewired

react-app-rewired by @timarney

configurable-react-scripts by @svrcekmichal

Maintainer

Bruno Lemos (@brunolemos on twitter)

Current Tags

  • 1.1.1                                ...           latest (a year ago)

11 Versions

  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.6-10                                ...           2 years ago
  • 1.0.6-9                                ...           2 years ago
  • 1.0.6-8                                ...           2 years ago
  • 1.0.6-7                                ...           2 years ago
  • 1.0.6-6                                ...           2 years ago
  • 1.0.6-5                                ...           2 years ago
  • 1.0.6-4                                ...           2 years ago
  • 1.0.6-3                                ...           2 years ago
  • 1.0.6-1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 13
Last Day 0
Last Week 11
Last Month 11
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |