All Projects → FreemenL → Emptyd Admin Webpack

FreemenL / Emptyd Admin Webpack

基于typescript react webpack的脚手架

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Emptyd Admin Webpack

Antd Dayjs Webpack Plugin
⏰ Day.js webpack plugin for antd
Stars: ✭ 215 (+616.67%)
Mutual labels:  moment, antd
react-antd-admin
react-antd-admin 是一个后台集成解决方案,它基于 react 和 antd; 内置了动态路由,标签页缓存,权限验证、切换功能
Stars: ✭ 42 (+40%)
Mutual labels:  react-redux, antd
Placeline Nextjs
HyperTrack Placeline web application sample using NextJS, Ant-Design, Styled-Components, and Heroku
Stars: ✭ 88 (+193.33%)
Mutual labels:  lodash, moment
Reactspa
combination of react teconology stack
Stars: ✭ 911 (+2936.67%)
Mutual labels:  antd, react-redux
Tonzhon Music
将QQ音乐、网易云音乐和酷我音乐上的歌添加到一个列表来播放!
Stars: ✭ 257 (+756.67%)
Mutual labels:  antd, react-redux
Simple Universal React Redux
The simplest possible Async Universal React & Redux Boilerplate app, that works on both Mac and Windows
Stars: ✭ 58 (+93.33%)
Mutual labels:  nodemon, react-redux
promotion-web
基于React: v18.x.x/Webpack: v5.x.x/React Router v6.x.x/ Antd: v5..x.x/Fetch Api/ Typescript: v4.x.x 等最新版本进行构建...
Stars: ✭ 374 (+1146.67%)
Mutual labels:  react-redux, antd
Vue Typescript Music
🔥 基于 vue 全家桶 音乐项目(Music project) vue+typescript 实现 高仿 网易云音乐 移动端WebApp
Stars: ✭ 94 (+213.33%)
Mutual labels:  lodash, moment
ant-design-snippets
ant-design-snippets
Stars: ✭ 18 (-40%)
Mutual labels:  react-redux, antd
react-cli
基于 create-react-app 搭建的前端脚手架
Stars: ✭ 18 (-40%)
Mutual labels:  react-redux, antd
Alldemo
🍑 2020全栈学习Demo大合集 包含最新 hooks TS 等 还有umi+dva,数据可视化等实战项目 (持续更新中)
Stars: ✭ 189 (+530%)
Mutual labels:  antd, react-redux
Antd Umi Sys
企业BI系统,数据可视化平台,主要技术:react、antd、umi、dva、es6、less等,与君共勉,互相学习,如果喜欢请start ⭐。
Stars: ✭ 503 (+1576.67%)
Mutual labels:  antd, react-redux
React Admin
基于[email protected]的react动态权限后台管理系统模板
Stars: ✭ 151 (+403.33%)
Mutual labels:  antd, react-redux
React Antd Admin
后台前端管理系统,基于react、typescript、antd、dva及一些特别优秀的开源库实现
Stars: ✭ 117 (+290%)
Mutual labels:  nodemon, antd
React Admin
基于antd、redux-observable、redux-thunk、react-router响应式SPA脚手架,后台管理系统demo. 权限管理,用户管理,菜单管理。无限级菜单,下拉树形选择框
Stars: ✭ 141 (+370%)
Mutual labels:  antd, react-redux
laravel-react-boilerplate
Laravel React Boilerplate with Ant Design, Route-Level Code Splitting, Redux, Sanctum Auth
Stars: ✭ 49 (+63.33%)
Mutual labels:  react-redux, antd
Starcabinet
🎉 开源的跨平台Github Stars管理分析工具
Stars: ✭ 399 (+1230%)
Mutual labels:  antd, react-redux
React Article Bucket
总结,积累,分享,传播JavaScript各模块核心知识点文章全集,欢迎star,issue(勿fork,内容可能随时修改)。webpack核心内容部分请查看专栏: https://github.com/liangklfangl/webpack-core-usage
Stars: ✭ 750 (+2400%)
Mutual labels:  moment, antd
React Native App Boilerplate
A simple and scalable boiler plate code for React Native App using React Native Navigation by WiX and Saga .
Stars: ✭ 9 (-70%)
Mutual labels:  react-redux
Todo React Redux
Todo app with Create-React-App • React-Redux • Firebase • OAuth
Stars: ✭ 942 (+3040%)
Mutual labels:  react-redux

emptyd-admin-webpack

基于typescript react webpack的脚手架

关于本项目功能

1.针对不同的loader采用了多进程编译,指定精确处理的目录和排除的目录,并开启缓存 极大的加快了编译速度。

2.使用webpack.DllReferencePlugin 根据环境自动 提取固定资源,加快编译与打包速度

3.区分生产环境和开发环境。

4.启用cssmodule 默认使用postcss + postcss-cssnext,内置处理浏览器前缀。

5.启用 tree shaking

6.启用 scope hoisting

7.Babel配有transform-runtime让代码更优化

8.更改文件,防缓存的hash规则

9.把小图片转成base64码

10.快速编译,热更新,自动刷新

11.resolve.modules 优化模块查找路径

12.optimization splitChunks 合并公共代码

13.单独抽离css文件

14.压缩css js 文件。

15.大文件跳过编译 直接拷贝

16.自定义loader 优化文件引入

17.自定义plugin 输出编译产出

18.nodemon 监听配置文件改动

19.系统级的错误提示

20.端口冲突自动切换

21.自动生成编译日志

22.编译结果可视化

23.本地端口运行打包后项目

24.脚手架 配置化

程序目录

├── build                    # webpack 配置目录
│   ├── loaders              # 自定义loader目录
│   ├── plugins              # 自定义plugin目录
│   ├── template             # html模版目录
├── config                   # 系统配置目录
├── dist                     # 打包资源
├── log                      # 日志目录
├── scripts                  # 运行脚本
├── src                      # 源码目录
├── static                   # 静态资路径(直接拷贝的文件)
├── typings                  # ts类型声明文件
├── .babelrc                 # babel配置(预设和插件)
├── .eslintrc.js             # eslint配置
├── package.json             # 项目描述
├── postcss.config.js        # postcss配置
└── tsconfig.json            # ts配置

项目启动

环境配置

  • 为了把保证项目正常运行,请自行更新相关环境。
  1. 安装node.js
  2. 安装git

依赖配置

  1. 首先clone项目
$ git clone https://github.com/FreemenL/emptyd-admin-webpack.git
$ cd emptyd-admin-webpack
  1. 下载依赖
  • 请确保你的环境配置完成,然后就可以开始以下步骤

    $ npm install                   # Install project dependencies
    $ npm start                     # Compile and launch
    

    命令说明

开发过程中,你用得最多的会是npm start,但是这里还有很多其它的处理:

npm run <script> Explain
start 初始化启动项目(生成Dll文件并启动服务)
build 打包
ls 将dist目录在本地8080端口运行

系统配置说明

module.exports = {
  // 模式  dev | run  区别:dev 会开启配置文件监听 run 不会
  pattern: 'run',
  // 系统路径配置 相对命令行启动目录 
  systemPath: {
    // 入口文件
    appIndex: 'src/index',
    // ts配置文件
    appTsConfig: 'config/tsconfig',
    // webpack ts配置
    webpackTsConfig: 'config/tsconfig-for-webpack-config',
    // 动态链接库
    appdllLibrary: '_dllLibrary_',
    // title图标
    appFavicon: 'src/public/favicon',
    // 依赖包路径
    appNodeModules: 'node_modules',
    // 日志目录
    appLog: 'log',
    // 源码目录
    appSrc: 'src',
    // 打包路径
    appBuild: 'dist',
    // 配置文件目录
    appConfig: ['build', 'config'],
    // 自定义loader目录
    appLoader: 'build/loaders',
    // 自定义 依赖包路径下需要awesome-typescript-loader 处理的文件目录
    appTsLoader: ['node_modules/[email protected]@emptyd', 'node_modules/[email protected]@freetool'],
    // 静态资源路径 存放较大文件 该目录下存放文件会被 CopyWebpackPlugin 直接复制到打包后dist/static 路径
    appStatic: 'static',
    // node_modules 下不会被cssmodule 处理的文件路径
    appExcludeCssModule: ['antd', 'normalize.css', 'rc-texty', 'nprogress', 'braft-editor', 'rc-queue-anim', 'viewerjs'],
    // 路径别名相对源码目录
    appPathAlias: {
      '@src': '',
      '@components': `components`,
      '@actions': `store/actions`,
      '@constants': `store/constants`,
      '@pages': `pages`,
      '@reducers': `store/reducers`,
      '@router': `router`,
      '@store': `store`,
      '@public': `public`,
      '@utils': `utils`,
      '@service': `service`
    }
  },
  // 系统常量
  systemConstant: {
    // 系统名称
    title: 'emptyd系统',
    // html模板文件 路径相对命令行启动目录
    htmlTemplate: './build/template/index.html'
  },
  // 开发环境配置
  devConfig: {
    // 本地服务端口 支持同时启动多个服务
    localServerPort: 8091,
    // 代理配置
    // proxyTable: {
    //   '/**': {
    //     target: 'http://193.112.220.100',
    //     changeOrigin: true,
    //     secure: true
    //   }
    // }
  },
  // 是否生成编译报告  为true时候可在 127.0.0.1:8888查看编译结果
  bundleAnalyzerReport: false,
  // 动态连接库中排除
  dllLibraryExclude: ['freetool','antd','antd-mobile', 'normalize.css'],
  // 是否开启编译缓存 
  onCompiltionCache: false,
  // 是否开启代码检查 
  onLint: true,
  //上传服务器配置
  remoteServer:{
    uploadFile:'./dist/**',
    sshConfig:{
      remotePath:'/root/nginx_szcg/website/zhifa/dist',
      ssh: { // 正式
        host: "129.139.254.333",
        port: 22,
        username: 'root',
        password: 'xxxxxxxxxxxxx'
      }, 
      commands: [
        // 删除现有文件
        `rm -rf /root/nginx_szcg/website/zhifa/dist`
      ]
    }
  }
}

欢迎感兴趣的伙伴提pr 一起维护
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].