从零开始搭建react脚手架

前端之家收集整理的这篇文章主要介绍了从零开始搭建react脚手架前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  • 安装create-react-app:
    npm  -g  install  create-react-app
  • 创建一个新项目:
    create-react-app  myapp
  • 进入项目:
    cd  myapp
  • 安装必备插件
    npm  install  dollarPHP  less  less-loader  create-react-class  prop-types  redux  react-redux  react-router-dom  antd
  • node_modules/react-scripts/config

    文件夹找到:

    webpack.config.dev.js

    webpack.config.prod.js

    两个文件修改配置,使其支持less:

    从零开始搭建react脚手架

  • 参考项目:
    https://github.com/dollarPHPer/react.git
  • 猜你在找的React相关文章