最赞回答 / 俱沫
在配置文件中,首先引入 nodejs 的 path 模块:let path = require('path');然后,设置成绝对路径就好了:path: path.join(__dirname, 'dist/'),
2017-05-30
最新回答 / cmy11
最好的办法是在entry主动设置键名,//大括号是对象模式,可以灵活组合多个js文件entry: {//app就是键名,就是对应[name]的部分'app': './src/app.js',//其他js文件,相当于多个chunks'app2': './src/app2.js',},按照这个配置,这样output输出的就一定app.bundle.js和app2.bundle.js啦!
2017-05-30
最新回答 / 慕斯卡7304553
npm WARN babel-loader@7.0.0 requires a peer of webpack@2 but none is installed. You must install peer dependencies yourself.npm WARN extract-text-webpack-plugin@1.0.1 requires a peer of webpack@^1.9.11 but none is installed. You mustinstall peer dependenc...
2017-05-30
这一节里老师有口误,template后dist里的html又生成的标签是bundle。js那个,不是那两个有hash值的
2017-05-29