拿来即用的 react 脚手架react
没有使用create-react-app
,直接走webpack显性配置,使配置透明。webpack
脚手架是我根据大多数公司的业务,取其共同需求搭建的,而且作了项目优化,无论小项目仍是大项目均可以很好的支撑。git
typescript
开发react
真的是绝配less
直接引用在入口文件中,页面级样式使用styled-components npm install react-ve -g
react-ve init [projectName]
cd [projectName]
yarn
或 npm install
npm run dll
npm start
在浏览器地址栏中输入:localhost:3000
便可访问github
项目打包,运行npm run build
便可,项目将打包至dist
文件夹内web
react
typescript
antd
styled-components
react-router-dom
immutable
你能够根据喜爱来install
或uninstall
它们。typescript
项目公共样式(包括antd
、框架、装饰页)使用less
,页面级样式采
用styled-components
,以防止样式污染。npm
在webpack.dll.config.babel.js
中,默认打包的公共包包括:浏览器
entry: { vendor: ['react', 'react-dom', 'antd', 'react-router-dom', 'immutable'] }
你能够根据本身的喜爱作删减babel