Webpack dev server takes up a LOT of memory
The webpack-dev-server
process is a memory hog. As of Feb 22nd it is coming in at 751.9MB for the CE branch. This is after having removed the imports-loader
plugin in !9123 (merged) and before this it was often as high as 850MB.
This seems really excessive and I'm trying to ascertain the root cause of it. This issue will serve as a place to discuss and chronicle our attempts to alleviate this memory footprint.
I think there are a few things worth trying:
-
Try exempting node_modules
withindevServer.watchOptions
(suggested by Kees Kluskens) -
Test out this webpack PR meant to improve memory use (suggested by Kees Kluskens) -
Implement CommonsChunkPlugin
to prevent multiple copies of Vue from being retained in memory -
Reduce the number of babel plugins we use by replacing babel-preset-es2015
withbabel-preset-env
(#28026 (closed))
/cc @jschatz1