CSS Modules configuration does not take effect webpack4

use webpack4 to build a vue project. CSS Modules, is configured in the configuration file, but it doesn"t work and doesn"t report an error!
the following is the code for the module option in the configuration file

module: {
    rules: [
      {
        test:/\.html$/,
        use:["html-loader"]
      },
      {
        test: /\.vue$/,
        loader: "vue-loader",
        options: {
          cssModules: {
            localIdentName: "[path][name]---[local]---[hash:base64:5]",
            camelCase: true
          }
        }
      },
      {
        test: /\.css$/,
        use: [
          { loader: "style-loader" },
          { loader: "css-loader"}
        ]
      },
      {
        test: /\.scss$/,
        use: [
          { loader: "style-loader"},
          { loader: "css-loader"},
          {
            loader: "px2rem-loader",
            // options here
            options: {
              remUni: 75,
              remPrecision: 8
            }
          },
          { loader: "sass-loader" }
        ]
      }
    ]
  },

here is the code for the vue component

<template>
  <div>
    <h1 class="home" :class="$style.home">home</h1>
    <p :class="$style.title">888

</div> </template> <script> export default { } </script> <style lang="scss" module> @import "../../assets/css/reset.scss"; .home{ color: blue; font-size: 80px; } </style>

normally the class name generated by cssmodule should be displayed, but now there is nothing
clipboard.png

Apr.12,2021

if you are using vue-loader v15 version, you can refer to

CSS Modules
CSS Modules now needs to be explicitly configured with the css-loader option. The module feature on the < style > tag still needs to be used for local injection into the component.

the good news is that you can now configure localIdentName in the same place:

{
module: {

rules: [
  {
    test: /\.css$/,
    use: [
      {
        loader: 'vue-style-loader'
      },
      {
        loader: 'css-loader',
        options: {
          modules: true,
          localIdentName: '[local]_[hash:base64:8]'
        }
      }
    ]
  }
]

}
}

official documents
https://vue-loader.vuejs.org/.


Why? I met it, too. Has it been solved by the landlord?


I have the same problem. I don't know what went wrong, and I don't report an error

.
Menu