{"id":41363453,"url":"https://github.com/mjzhang1993/react-router4-template","last_synced_at":"2026-01-23T08:10:20.299Z","repository":{"id":22290523,"uuid":"95844346","full_name":"mjzhang1993/react-router4-template","owner":"mjzhang1993","description":"react-v16 react-router-v4 redux webpack ","archived":false,"fork":false,"pushed_at":"2023-01-07T04:03:57.000Z","size":3361,"stargazers_count":48,"open_issues_count":16,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-14T08:31:43.024Z","etag":null,"topics":["babel","code-splitting","eslint","hmr","pwa","react-hot-loader-v4","react-router-v4","react-v16","redux-v3","scss","webpack-dev-server","webpack-v3","webpack-v4","workbox","yarn"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjzhang1993.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-30T03:27:32.000Z","updated_at":"2024-04-14T08:31:43.025Z","dependencies_parsed_at":"2022-08-25T22:00:42.333Z","dependency_job_id":null,"html_url":"https://github.com/mjzhang1993/react-router4-template","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mjzhang1993/react-router4-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjzhang1993%2Freact-router4-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjzhang1993%2Freact-router4-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjzhang1993%2Freact-router4-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjzhang1993%2Freact-router4-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjzhang1993","download_url":"https://codeload.github.com/mjzhang1993/react-router4-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjzhang1993%2Freact-router4-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28684014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","code-splitting","eslint","hmr","pwa","react-hot-loader-v4","react-router-v4","react-v16","redux-v3","scss","webpack-dev-server","webpack-v3","webpack-v4","workbox","yarn"],"created_at":"2026-01-23T08:10:19.550Z","updated_at":"2026-01-23T08:10:20.291Z","avatar_url":"https://github.com/mjzhang1993.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react16-router4-template\n\n### 版本\n\n* master 分支与 v3.0.0 tag 是 webpack 5.x + redux + immer + Typescript 的版本\n* webpack-v3-template 分支与 v1.0.0 tag 是 webpack 3.x 的版本\n* webpack-v4-template 分支与 v2.0.0 tag 是 webpack 4.x 的版本\n* enhance-redux redux 状态管理升级版本\n* *最新的构建改为了使用 mobx, 源码参考地址 https://github.com/mjzhang1993/react-mobx-template/tree/master*\n\n## 重要文件版本\n\n\u003e 更多版本信息查看 package.json 文件\n\n\n## 命令\n\n#### 0. 安装\n\n```bash\n   yarn install\n```\n\n#### 1. 打包 DLL 文件\n\n```bash\n   yarn build:dll\n```\n\n#### 1. 运行开发环境\n\n```bash\n   yarn start\n```\n\n#### 2. 输出生产环境文件\n\n```bash\n   yarn run build\n```\n\n#### 3. 输出生产环境，并查看模块分配\n\n```bash\n    yarn run build -- -r\n```\n\n#### 5. 安装 yarn\n\n\u003e yarn 是用来代替 npm 的 node 包管理工具, 与 npm 有类似的命令，具体安装方式及使用方法查看 [yarn 命令使用](http://blog.csdn.net/mjzhang1993/article/details/70092902)\n\n## 项目相关文章\n\n* [React - Webpack 开发环境重新搭建](http://blog.csdn.net/mjzhang1993/article/details/79013430)\n* [重新搭建 React - Redux - Router 完整项目](http://blog.csdn.net/mjzhang1993/article/details/79022633)\n* [React-router-v4 - Webpack 实现按需加载（code-splitting）](http://blog.csdn.net/mjzhang1993/article/details/79094594)\n* [使用 Immer 代替 immutable 在 react 项目中实现不可变数据](https://blog.csdn.net/mjzhang1993/article/details/117084495)\n\n## 目录结构说明\n\n```bash\n   .\n├── README.md\n├── babel.config.js\n├── build                              # 构建结果\n├── dll                                # 生成的 dll\n├── lint-staged.config.js\n├── report                             # 打包结果\n├── scripts                            # 构建相关脚本\n│   ├── build.js\n│   ├── config\n│   ├── dll-version-check.js\n│   ├── dll.js\n│   ├── start.js\n│   └── utils\n├── src\n│   ├── bootstrap.tsx            # 启动文件\n│   ├── index.html\n│   ├── index.tsx                # 入口文件\n│   └── store                    # store 相关封装\n│       ├── StoreNames.ts\n│       ├── createSlice.ts\n│       ├── createStore.ts\n│       ├── index.ts             # store 对接入口\n│       └── initImmer.ts\n│   ├── modules                  # 业务模块\n│   │   ├── remote\n│   │   └── root\n│   ├── components # 抽象的组件\n│   │   └── DynamicSystem\n├── tsconfig.json\n├── tsconfig.prod.json\n├── typings\n└── yarn.lock\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjzhang1993%2Freact-router4-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjzhang1993%2Freact-router4-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjzhang1993%2Freact-router4-template/lists"}