react-scripts-next
Latest version of original react-scripts
: 1.1.0
Disclaimer:
This is fork of
react-scripts
fromcreate-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:
less
support for create-react-appp
Adding - Execute command:
npm install --save-dev less-loader less
- 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: [],
};
babel-preset-stage-0
support for create-react-appp
Adding - Execute command:
npm install --save-dev babel-preset-stage-0
- Modify
./config/web pack.config.[ENV].js
module.exports = {
babelPlugins: [],
babelPresets: [require.resolve('babel-preset-stage-0')],
webpackLoaders: [],
webpackPlugins: [],
};