zp25 / work-react

React starter kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

work-react

react起始模版

webpack@4 + redux + react-router@5 + react-hot-loader@4

目录

app目录

+-- actions
+-- components
+-- containers
|   +-- devtools
|   +-- root
|   |   +-- dev.jsx
|   |   +-- index.jsx
|   |   +-- prod.jsx
|   +-- app.js
+-- images
+-- pages
|   +-- app.jsx
|   +-- app.scss
+-- reducers
+-- sagas
+-- store
+-- apis.js
+-- index.jsx
+-- routes.js

public目录存放html模板(handlebars)和不需要经模块系统处理的资源(使用copy-webpack-plugin复制到dist目录)

env

.env文件配置

# devserver
HOST=localhost
PORT=8080

# html文件名
INDEX=index.html

serve配置在serve.json

libpng issues

image-webpack-loader依赖libpng,缺少会报错,tcoopman/image-webpack-loader#142

# osx
brew install libpng

# ubuntu
sudo apt-get install libpng16-dev

安装依赖

资源

About

React starter kit

License:MIT License


Languages

Language:JavaScript 91.9%Language:CSS 5.9%Language:HTML 2.2%