react-scripts-next
Allow custom configuration for create-react-app without ejecting.
Last updated 10 months ago by sjke .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-scripts-next 
SYNC missed versions from official npm registry.

react-scripts-next

Latest version of original react-scripts: 1.1.0

Disclaimer:

This is fork of react-scripts from create-react-app. It provides simple way to modify webpack config without ejecting.

How to use it

npx create-react-app my-app --scripts-version react-scripts-next

Modify the ./config/web pack.config.[ENV].js file in the root of the generated project and add any of the configuration options that you want.

Available Configuration options

  • babel plugins
  • babel presets
  • webpack loaders
  • webpack plugins

A few examples:

Adding less support for create-react-appp
  1. Execute command:
npm install --save-dev less-loader less
  1. Modify ./config/web pack.config.[ENV].js
module.exports = {
  babelPlugins: [],
  babelPresets: [],
  webpackLoaders: [
    {
      test: /\.less$/,
      use: [{
        loader: 'style-loader',
      }, {
        loader: 'css-loader',
      }, {
        loader: 'less-loader',
      }],
    },
  ],
  webpackPlugins: [],
};
Adding babel-preset-stage-0 support for create-react-appp
  1. Execute command:
npm install --save-dev babel-preset-stage-0
  1. Modify ./config/web pack.config.[ENV].js
module.exports = {
  babelPlugins: [],
  babelPresets: [require.resolve('babel-preset-stage-0')],
  webpackLoaders: [],
  webpackPlugins: [],
};

Current Tags

  • 1.1.2                                ...           latest (10 months ago)

3 Versions

  • 1.1.2                                ...           10 months ago
  • 1.1.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 4
Last Day 3
Last Week 1
Last Month 2
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |