I'm finding that webpack-serve
is taking a lot longer to build than webpack-dev-server
. I have both of them set up at the same time, as shown in the image below. -serve
takes twice as long for the initial build and about 10x as long for a simple hot build. They are both set up in the same way, using a proxy to serve up the non-webpack'd content from the real server. Other than that, it's all the default settings.
If webpack-serve
is supposed to be "lightning fast" compared to wds
, why is mine taking so much longer?
SOLVED:
mode
was set toproduction
instead ofdevelopment
(and therefore UglifyJSPlugin was wasting all the time on each build).I thought I had it set up right, using
mode: process.env.WEBPACK_SERVE ? 'development' : 'production'
in my mainwebpack.js
config file. However, because I wasn't using thewebpack-serve
CLI, it wasn't actually setting thatenv
variable. (I have it setup to use theserve()
function)