GitXplorerGitXplorer
b

extensible-react-scripts

public
3 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
50c03134ab58950cfcd530ac18eef49d87d72fab

Merge branch 'master' of github.com:facebookincubator/create-react-app

bbrunolemos committed 6 years ago
Unverified
cb1608b3e02e0eef5fd350f6e4cf5ce32bdfc215

Add troubleshooting for Github Pages (#4197)

committed 6 years ago
Unverified
c6375edc079a71bd9addd50c58441cbca8839945

`.mjs` should not resolve before .js files (#4085)

lleebyron committed 6 years ago
Verified
a456885b74afb36de9fb428a13cd406c7d62e450

v1.1.1

bbrunolemos committed 7 years ago
Unverified
0b1d6365768ae3bd267b042b74bab249673f1a9f

Publish

ggaearon committed 7 years ago
Unverified
1a9722f50a8b8786803c1f784efca366a43f38da

Revert "Set the public path to the asset manifest entries (#2544)"

ggaearon committed 7 years ago

README

The README file for this repository.

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

react-app-rewired by @timarney

configurable-react-scripts by @svrcekmichal

Maintainer

Bruno Lemos (@brunolemos on twitter)