Skip to content

Allow configure create-react-app without ejecting.

Notifications You must be signed in to change notification settings

sjke/react-scripts-next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: [],
};

About

Allow configure create-react-app without ejecting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published