1、一个简单的webpack打包例子(无需在webpack.config.js中配置)

目录结构

package.json依赖项

{
  "name": "xz",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "webpack": "^3.8.1"
  }
}

打包命令

webpack src/entry.js dist/bundle.js

 

posted @ 2017-10-23 14:53  xuanPhoto  阅读(202)  评论(0)    收藏  举报