webpack --watch exits after building once

后端 未结 2 1149
情书的邮戳
情书的邮戳 2020-12-16 06:16

I was using webpack --watch statement to run my webpack in watch mode for building my ReactJS app. However for some reason, it stopped working now. It now just

2条回答
  •  旧时难觅i
    2020-12-16 06:48

    This happen mostly because it watches the node_modules folder and exceeds the limit. In this case, rather than modifying the host system, use:

      watchOptions: {
        aggregateTimeout: 300,
        poll: 1000,
        ignored: /node_modules/
      }
    

    to the webpack.config.js exports.

提交回复
热议问题