webpack 4 執(zhí)行 webpack hello.js hello.bundle.js 報(bào)錯(cuò)
webpack 4 執(zhí)行 webpack hello.js hello.bundle.js
報(bào)錯(cuò):
ERROR in multi ./hello.js hello.bundle.js
Module not found: Error: Can't resolve in 'hello.bundle.js' in 'F:\git\webpack-demo'
@ multi ./hello.js hello.bundle.js
webpack 4如何在命令行中執(zhí)行 hello.js 打包到hello.bundle.js?
2018-03-20
webpack 4 之后這個(gè)命令已經(jīng)不行,需要命令行指明output-filename 和 output-path
npx webpack hello.js --output-filename hello.bundle.js --output-path . --mode development?
2019-08-13
非常感謝
2019-03-13
視頻講的是webpack3.0的版本,可能你本地的是webpack4.0的版本,webpack hello.js hello.bundle.js 這個(gè)執(zhí)行語(yǔ)句在4.0中已經(jīng)不能用了,所以你要使用npx webpack hello.js --output-filename hello.bundle.js --output-path . --mode development?
2018-12-18
好了,就是不知道如何重新打包的命令是什么。。。。 再次打包就報(bào)錯(cuò)了。不過(guò)只看到第一節(jié),后面應(yīng)該會(huì)講到。
2018-03-20
我嘗試了很多,都報(bào)錯(cuò),不過(guò)可以安裝版本就可以了
2018-03-20
很可能路徑錯(cuò)了
pageage.json
webpack.config.js
文件目錄