Under vue cli3.0, the style cannot be hot updated

css.extract

    Type: boolean | Object

    Default: true in production environment and false in development environment

    Whether to extract the CSS in the component into a separate CSS file (rather than dynamically injecting inline code into JavaScript).

    Also it is always disabled when building Web Components (styles are inline and injected into shadowRoot).

    When building as a library, you can also set this to false to prevent users from importing CSS themselves.

    Extract CSS is silent in development mode! recognize! No! open! start! because it is not compatible with CSS hot reloading. However, you can still explicitly set this value to true to force extraction in all cases.


You can directly add
the css: { sourceMap: false, modules: false } extract parameter, you can still extract CSS, and the Style modification can also be updated in real time. The modification needs to restart the project configuration to take effect-0-    



Guess you like

Origin blog.csdn.net/cuiyuchen111/article/details/100078645