Giter VIP home page Giter VIP logo

react-struct's Introduction

REACT 后台管理

🚀 基于 webpack5 搭建的 React 中后台项目框架模板。🚀DMP

说明

本项目为 React 中后台项目框架模板,方便快速进行具体项目开发。包括 Webpack5 配置及打包优化、React 全家桶使用(React + React-router + Axios + Antd)、ESLint 等项目开发规范等。

技术栈

涉及的技术栈均采用当前最新的版本和语法:

  • 使用 Webpack5 构建项目(不使用 create-react-app等脚手架);
  • 使用 Babel7 配置转换 ES6、React 等语法;
  • React 版本 V17,全部采用函数化 Hooks 特性开发项目组件;
  • 采用 React-router5 工具 配置项目路由;
  • UI 库采用流行的 Ant-design4.16 组件库;
  • 完整项目实现及模块结构拆分;

目录结构

├── build                   // webpack配置
│   ├── webpack.base.js     // webpack通用配置
│   ├── webpack.dev.js      // webpack开发环境配置
│   └── webpack.prod.js     // webpack生产环境配置
├── dist                    // 打包输出目录
├── public                  // 项目公开目录
├── src                     // src开发目录
│   ├── assets              // 静态资源
│   ├── components          // 公共组件
│   ├── layouts             // 页面布局组件
│   ├── pages               // 具体业务页面
│   ├── routers             // 项目路由配置
│   ├── services            // http服务等相关
│   ├── stores              // 全局公共 store
│   ├── styles              // 存放公共样式
│   ├── utils               // 工具库/通用函数
│   └── index.tsx           // 项目入口文件
├── .babelrc                // babel配置
├── .editorconfig           // 项目格式配置
├── .eslintrc.js            // ESLint配置
├── .gitignore              // git 忽略配置
├── postcss.config.js       // postcss配置
├── package.json            // 依赖包配置
├── tsconfig.json           // ts配置
└── README.md               // 项目说明

CLI 构建命令

克隆项目

# git clone https://github.com/MuXiaoKe/react-struct.git

初始化依赖配置

npm install

开发环境 启动运行

npm start

生产环境 打包构建

npm build  //生产环境 打包构建

npm build:report // 图形化分析打包文件大小;

npm build:watch // 方便排查生产环境打包后文件的错误信息(文件source map);

More

react-struct's People

Contributors

muxiaoke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.