Configuration and scripts using webpack, mainly refers to react-scripts.
npm install alpha-scriptsThis is a fork of react-scripts with some modifications that can toggle extra features.
Install with npm:
```
npm install --save-dev alpha-scripts
Install with yarn:
``
yarn add alpha-scripts --dev
Runs the app in development mode:
``
alpha-scripts start
Builds the app for production to the build folder:
``
alpha-scripts build
You can also config the "scripts" property of the package.json file.
You can pass options using a configuration file .alpharc.js in the root directory and export an object containing your configuration.
#### analyzer (default: false)
This option will enable analyzer, only in production mode, will open analyzer result in http://localhost:1234 .eslintrc.* files.
#### eslintrc (default: false)
This option will enable eslint using configuration defined in .eslintrc.* files.
#### eslintConfigPath
This option set eslint configuration file path.
#### babelrc (default: false)
This option will enable the use of .babelrc configuration files.
#### modules
add directories for webpack to resolve modules from, see webpack resolve.modules
`js`
modules: ['components'];
#### alias
set resolve aliases, see webpack resolve.alias
#### proxy
proxying API requests in development
#### plugins
allow additional webpack plugins. See plugins page for detail.
#### mockOptions
specify the options for mock data, more
#### openPathname
specify the default open pathname in development
`js`
openPathname: '/homepage';
#### theme
override less variables via less-loader modifyVars
`js`
theme: {
'primary-color': '#1DA57A',
},
#### includePaths
paths for babel-loader to resolve
#### watchIgnored`
specify watch ignore files and/or directories watchOptions.ignored
Note:
If you want to override @icon-url, the value must be contained in quotes like "@icon-url": "'your-icon-font-path'". A fix sample.
---