Move responsibilty for webpack compilation to the app?
Currently a PubSweet app is responsible for installing webpack-dev-middleware
and webpack-hot-middleware
, as well as webpack plugins and most of the configuration, but pubsweet-cli
contains the dependency for webpack
and calls webpack-dev-middleware
and webpack-hot-middleware
indirectly via a relative path to the node_modules dir. This makes it impossible for an app to upgrade webpack and difficult to keep the plugins in sync.
It would be more straightforward if everything webpack-related was handled by the app itself (or even, perhaps, if the app didn't need to do any webpack config at all).