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
I like the simplicity of nodemon-webpack-plugin
webpack.config.js
const NodemonPlugin = require('nodemon-webpack-plugin')
module.exports = {
plugins: [new NodemonPlugin()]
}
then just run webpack with the watch
flag
webpack --watch
Assuming nodemon server.js
touch the server.js
file afterEmit
:
// webpack.config.js
module.exports = {
// ...
plugins: [
// ...,
//