I am a react beginner, in the course of learning encountered a template to build problems, want to put their own problems recorded, the way to deepen the impression, there is no place please correct me.
In the course of learning, I mainly thank two people for their blogs:
- http://www.wukai.me/2016/09/14/create-a-react-webpack-es6-project/
- http://www.jianshu.com/p/42e11515c10f
These two people's blogs are written very well, interested students can go to see.
Since I have not contacted Webpack before, so I first learned a blog 2, and then in accordance with the implementation of blog 1.
What is Webpack?
Popular say is a modular baler. It analyzes the project structure, finds JavaScript modules, and some extended languages that cannot be run directly, and then packages them in the appropriate format for use by the browser. It works by taking the project as a whole, starting with a given file, finding all of the project's dependent files from the file, using loaders to process them, and finally packaging it as a browser-aware JS file.
Project structure
-src
-index.js
-app.js
-.babelrc
-index.html
-package.json
-server.js
-webpack.config.js
Project steps
Initialize Project
Learn to build a project based on React,webpack templates