1、最简单的命令
hello.js
function hello(str){ alert(str) }
webpack hello.js hello.bundl.js //即把hello.js 压缩成 hello.bundle.js
2、requrie
hello.js
require(‘./world.js‘) function hello(str){ alert(str) }
world.js
function world(){ return { } }
webpack hello.js hello.bundle.js
原文:http://www.cnblogs.com/xudy/p/6730465.html