react-build-cli

0.0.17 • Public • Published

react-build-cli

Installation

npm install -D react-build-cli
or
yarn add -D react-build-cli

Usage

react-build-cli start -m //  -m local mock
react-build-cli build
react-build-cli test

Configation

  1. Custom webpack configuration, automatically overwrite the current webpack configuration (webpack.config.js)

webpack.config.prod.js and webpack.config.dev.js has a higher priority

  1. local mock (.mockrc.json)
interface MockConfig {
    rootDir: string; // mock files
    api: string; // api prefix
    whiteList: string[]; // local mock whitlist
}
  1. rcb.config.js
interface RcbConfig {
    host?: string; // dev server host
    port?: number; // dev server port
    proxy?: ProxyConfigMap | ProxyConfigArray, // dev server proxy
    mock?: MockConfig, // mock config
    babelPresets?: PluginItem[] | null, // add babel presets
    babelPlugins?: PluginItem[] | null // add babel plugin
}

Package Sidebar

Install

npm i react-build-cli@0.0.17

Version

0.0.17

License

MIT

Unpacked Size

112 kB

Total Files

107

Last publish

Collaborators

  • crayon