已采纳回答 / 慕移动8870818
webpack 4 之后这个命令已经不行,需要命令行指明output-filename 和 output-pathnpx webpack hello.js --output-filename hello.bundle.js --output-path . --mode development
2018-03-20
$ webpack hello.js hello.bundle.js
Hash: 01077ebfa6ae3378d319
Version: webpack 4.1.1
Time: 303ms
Built at: 2018-3-18 16:09:51
1 asset
@ multi hello.js hello.bundle.js
打包报错到这里错的解决方法:
webpack hello.js -o hello.bundle.js
原答案在这里http://blog.csdn.net/sinat_20623345/article/details/79601640
Hash: 01077ebfa6ae3378d319
Version: webpack 4.1.1
Time: 303ms
Built at: 2018-3-18 16:09:51
1 asset
@ multi hello.js hello.bundle.js
打包报错到这里错的解决方法:
webpack hello.js -o hello.bundle.js
原答案在这里http://blog.csdn.net/sinat_20623345/article/details/79601640
2018-03-19
最新回答 / 鲸落mjh
<...图片...>如果你这里加了这段,注释掉看看,起初加这段是因为防止和htmlwebpackplugin产生title属性的冲突,现在看来应该是include限定了范围导致模板文件index.html无法被html-loader解析到,其中的图片自然就无法被打包
2018-03-16
不要把文件名起成webpack 会报错……Refusing to install webpack as a dependency of itself
2018-03-16