项目文件准备:
执行npm init,然后创建如下图所示的文件。
在index.html里面添加
<!DOCTYPE html>
<html>
<head>
<title>The Minimal React Webpack Babel Setup</title>
</head>
<body>
<div id=app></div>
[removed][removed]
</body>
</html>
在webpack.config.js里面添加
module.exports = {
entry: './src/index.js'