标签:
var path=require("path");
module.exports={
//文件入口
entry:path.resolve(__dirname,‘src/app.js‘),
//输出文件
output:{
path:path.resolve(__dirname,‘publish‘),
filename:‘bundle.js‘
}
}
配置npm
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"develop":"webpack --config webpack.developer.config.js"
},
执行npm run deve即可
标签:
原文地址:http://www.cnblogs.com/damingzi/p/5468089.html