手记

react webpack 2.0 配置

0.初始化项目

npm init

1.默认呢

{
  "name": "demo_1",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}
2.webpack2.0安装的命令

sudo npm install webpack@2.2.1 --save-dev

3.命令执行的结果
{
  "name": "demo_1",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "webpack": "^2.2.1"
  }
}
0人推荐
随时随地看视频
慕课网APP