无法使用watch选项?
Zohner opened this issue · 6 comments
Zohner commented
重现步骤:
- 使用 easy init 初始化项目,选择 create Nunjucks + HTML project boilerplate 类型
- 在webpack.config.js中添加watch: true节点
- 运行编译 npm run build
结果,报 TypeError 错误
D:\lab\easywebpack\01\node_modules\webpack-tool\lib\tool.js:115
compiler.plugin('done', compilation => {
^
TypeError: compiler.plugin is not a function
at WebpackTool.build (D:\lab\easywebpack\01\node_modules\webpack-tool\lib\to
ol.js:115:14)
at Object.exports.build (D:\lab\easywebpack\01\node_modules\easywebpack\inde
x.js:47:28)
at build (D:\lab\easywebpack\01\node_modules\easywebpack-cli\lib\builder.js:
87:13)
at Object.exports.build (D:\lab\easywebpack\01\node_modules\easywebpack-cli\
lib\builder.js:100:10)
at Command.program.command.description.action.env (D:\lab\easywebpack\01\nod
e_modules\easywebpack-cli\bin\cli.js:108:13)
at Command.listener (D:\lab\easywebpack\01\node_modules\commander\index.js:3
15:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (D:\lab\easywebpack\01\node_modules\commander\index.js:
hubcarl commented
为什么prod 监听? prod 构建只直接落地磁盘的,监听模式只在 dev 模式有效
addcky commented
同问几时能修复?