使用 Babel 5 和 Webpack 构建 React 应用的命令指南

安装依赖项

npm install

运行应用程序

npm start

其他命令

  • babel-loader:连接 webpack 和 Babel
  • @babel/core:集成其他 Babel 依赖项
  • @babel/preset-env:支持 ES5/ES6 语法
  • @babel/preset-react:支持 JSX 转译
  • webpack-core:核心 webpack 库
  • webpack-cli:执行 webpack 命令(如 webpack-dev-server)
  • webpack-dev-server:服务 webpack 捆绑包
  • html-webpack-plugin:简化 HTML 文件创建
zip
react-scratch-app-master.zip 预估大小:9个文件
folder
react-scratch-app-master 文件夹
file
package.json 730B
file
babel.config.json 63B
file
package-lock.json 277KB
folder
src 文件夹
file
index.js 329B
file
index.html 316B
folder
Components 文件夹
file
SimpleComponent.js 573B
file
.gitignore 13B
file
webpack.config.js 633B
file
README.md 952B
zip 文件大小:70.22KB