Using react-loadable with Nodemon?

2019-08-27 16:02发布

问题:

I added React-Loadable to an SSR React app. I was using Nodemon to keep the dev server running, but now I always get

[nodemon] clean exit - waiting for changes before restart

This is likely because of the React-Loadable change in server.js, but I'm not too familiar with how Nodemon works.

Loadable.preloadAll().then(() => {
  app.listen(process.env.PORT || 3000);
});

Open to switching to webpack-dev-server if that makes things easier.