webpack已经升级到3.0很久了,相对于2.0其实还是有不少改动的,而且公司之前项目用的还是1.0…,所以这次趁着版本升级,决定自己写一个,主要参考了create-react-app和vue-cli的配置,技术栈:webpack3+react+react-router4+react-redux+axios+less,欢迎大家指点。
主要内容
- webpack相关配置
- react + react-router + react-redux的使用
源码地址:https://github.com/wandiao/react-demo
下载
git clone https://github.com/wandiao/react-demo.git
cd react-demo
npm install (安装依赖模块)
运行
npm run start (开发版本访问:http://localhost:3000/)
npm run build (发布生产版本)