webpack --watch isn't compiling changed files

后端 未结 30 1096
眼角桃花
眼角桃花 2020-12-02 06:00

I tried running webpack --watch and after editing my JS files, it doesn\'t trigger an auto-recompilation.

I\'ve tried reinstalling webpack

30条回答
  •  清歌不尽
    2020-12-02 06:30

    Adding the following code to my webpack configuration file fixed the issue for me. Don't forget to ignore your node_modules folder, as that would kill performance for HMR (Hot Module Replacement):

    watchOptions: {
      poll: true,
      ignored: /node_modules/
    }
    

提交回复
热议问题