About the new version of roadhogrc

I recently started a new project using dva new

I found a problem. When npm start, the css packaged by the project no longer has only one, but a bunch of them, see the figure below

 These are all css files loaded on demand, which leads to a problem. When the page is refreshed, the css is loaded lazily, and the html is rendered first. The surface css is packaged in js. When the program is executed to the js file At the beginning of 35m, there is no css, so the user experience is very poor, I know that all css will be packaged separately after packaging (so that there is no css to be loaded in the js file) .

solve:

 The roadhog version number in the packjson of the new project is 1.1, just change this version number to an older version,

"roadhog": "^0.5.2"

Just rm -rf node_modules && cnpm i again.

In this way, there is only one css packaged, and the page will not block the rendering of the page.

see the picture below

 

I haven't updated for a long time, because my wife is about to give birth, I don't have time

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324383411&siteId=291194637