主要涉及目录说明: package.json 所使用插件版本和启动命令/浏览器兼容版本 babel.config.js 处理语法兼容 .eslintrc.js 开启eslint检测 config目录包含: webpack.base.js 基础公共环境配置项 webpack.dev.js 开发环境配置项 webpack.prod.js 生产环境配置项
package.json文件和配置项
{
"name": "react-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "npm run dev",
"dev": "cross-env NODE_ENV=development webpack serve --config ./config/webpack.dev.js",
"build": "cross-env NODE_ENV=production webpack --config ./config/webpack.prod.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"browserslist": [
"last 2 version",
"> 1%",
"not dead"
],
"devDependencies": {
"@babel/core": "^7.
|