When developing with webpack4, using scss-loader real-time hot update style to load slowly, resulting in a splash screen, ask for tips!

< H1 > problem description < / H1 >

recently fiddling with webpack4, configuration reference vue-cli, but when actually developing, scss-loader or stylus-loader is used for convenience.

  • without extract-text-webpack-plugin, every time modifies the style, the style will be updated in real time, but there will be a splash screen for a few seconds , that is, the style is not loaded
  • After using extract-text-webpack-plugin,
  • will not splash the screen, but will not update the style in real time . I have been tampering with it for a long time, so I ask all the bosses for advice.
< H1 > screenshot of the question < / H1 >


check whether it is caused by babel-loader compiling third-party class libraries. It is recommended to use webpack-bundle-analyzer, to generate analysis diagrams to see if unwanted third-party libraries are compiled

.
Menu