Webpack --watch and launching nodemon?

后端 未结 8 1678
伪装坚强ぢ
伪装坚强ぢ 2021-01-30 10:51

Thanks to an excellent answer by @McMath I now have webpack compiling both my client and my server. I\'m now on to trying to make webpack --watch be useful. Ideally

8条回答
  •  忘了有多久
    2021-01-30 11:29

    There's no need to use plugins here. You could try running multiple nodemon instances like below. Try modifying the following script for your use case, and see if it works for you:

    "scripts": {
        "start": "nodemon --ignore './public/' ./bin/www & nodemon --ignore './public/' --exec 'yarn webpack'",
        "webpack": "webpack --config frontend/webpack.config.js"
    }
    

提交回复
热议问题