Webapck 3.x package file volume control

the size of the packaged vue file is too large

Environment:

  1. vue-cli 2.93
  2. webpack 3.6.0

question

when npn run build is packaged, all css, is assembled in a app. [hash] .css file with a volume of 1.7m. If subsequent projects continue to add modules, the file will become larger and larger. The page loading speed can not go up at all, and the loading time is about 10s

how to extract css, package it according to module, load it on demand, and separate it into multiple css files

May.30,2021
Menu