Js can normally extract common modules, but css cannot extract common modules, which means that after packaging, each module can introduce corresponding css, for example, index module has index.css, and about module has about.css However, if a framework such as bootstrap.less or weui.less is introduced into the two modules at the same time, the CSS corresponding to each module will package the framework once instead of generating vendor.css
According to my understanding, the files that need to be changed should be webapck.base.conf, webpack.prod.conf and utils. referring to other multi-page architectures on github, the changes failed several times.
The main reason is that I am not familiar with the API of Webpack. Node has just learned it. I hope someone can give me some advice.
Css file to
/staticTry under the catalogue.
In addition, I recommend routing
vue-routerInstead of transforming a multi-page scaffold.