When webpack uses extractTextPlugin to separate css files, the style will be inserted directly into the header of html. How to solve this problem?

question: when using webpack plug-in extract-text-webpack-plugin to separate multi-entry css styles, only one css file (main.css) is generated, and the rest of the entry styles are inserted into html"s header. Now what should I do if I want to insert the styles into header and extract them into vender.css?

my webpack.config.js configuration is as follows:

   

how can I extract the insert into the page style? Thank you very much for the help of the great gods.

The extractTextPlugin of

webpack4+ has been abandoned. The alternative is mini-css-extract-plugin

.
Menu