0.1.7 • Published 2 years ago

@jinxyang/react-cli v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-cli

project template is here: react-cli-template

Getting started

Installation

npm i @jinxyang/react-cli -g

Basic usage

development

react-cli dev

bundle

react-cli build

Options

react-cli.config.js (optional)

development server port

module.exports = {
  port: 8080, // default is 3000
}

sass (less)

for now, just support style-resources-loader

module.exports = {
  sass: {
    // for /\.scss$/
    resources: {}, // style-resources-loader's options
  },
  less: {
    // for /\.less$/
    resources: {}, // style-resources-loader's options
  },
}

development server proxy

use http-proxy-middleware

module.exports = {
  proxy: [
    {
      path: '/api',
      options: {}, // createProxyMiddleware's options
    },
  ],
}

custom splitChunks

module.exports = {
  splitChunks: {
    cacheGroups: {
      react: {
        name: 'react',
        priority: 10,
        test: /[\\/]node_modules[\\/](react|react-dom|react-router-dom)[\\/]/,
      },
      antd: {
        name: 'antd',
        priority: 10,
        test: /[\\/]node_modules[\\/](antd|@antd-)/,
      },
    },
  },
}

Feature

  • copy files (/static to /dist)
  • styled-components & sass & less
  • css-modules (ext with .m.ext)
  • postcss (autoprefixer)
@ant-design/icons@babel/cli@babel/core@babel/eslint-parser@babel/plugin-proposal-do-expressions@babel/plugin-proposal-export-default-from@babel/plugin-proposal-partial-application@babel/plugin-proposal-pipeline-operator@babel/plugin-proposal-record-and-tuple@babel/plugin-transform-runtime@babel/preset-env@babel/preset-react@babel/runtime@commitlint/cli@commitlint/config-conventional@pmmmwh/react-refresh-webpack-plugin@soda/friendly-errors-webpack-plugin@stylelint/postcss-css-in-jsantdarchiverbabel-loaderbabel-plugin-styled-componentschalkcolorcommanderconnect-history-api-fallbackcopy-webpack-plugincore-jscosmiconfigcss-loadercss-minimizer-webpack-plugineslinteslint-config-prettiereslint-config-standardeslint-formatter-prettyeslint-plugin-importeslint-plugin-nodeeslint-plugin-prettiereslint-plugin-promiseeslint-plugin-reacteslint-plugin-react-hookseslint-webpack-pluginexecaexpressfs-extrahtml-webpack-pluginhttp-proxy-middlewarehuskyinquirerjs-base64lessless-loaderlint-stagedlodashmimemini-css-extract-pluginpostcss-htmlpostcss-loaderpostcss-markdownpostcss-scssprettierquery-stringreactreact-cropperreact-domreact-highlight-wordsreact-refreshreact-router-domreact-sortablejsreact-transition-groupsasssass-loaderscroll-into-view-if-neededstyle-loaderstyle-resources-loaderstyled-componentsstylelintstylelint-config-prettierstylelint-config-rational-orderstylelint-config-standardstylelint-prettierstylelint-webpack-pluginterser-webpack-pluginwebpackwebpack-bundle-analyzerwebpack-dev-middlewarewebpack-hot-middlewarewebpack-merge
0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.5

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.9

2 years ago

0.1.3

2 years ago

0.0.8

2 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago