Webpack package iconfont cannot collect woff2 files

there are css, eot, svg, ttf, woff and woff2 files under my iconfont, but woff2 files cannot be packaged into the release directory

this is the file in my source code


May.18,2022

check the configuration of your font file loader
such as

{
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: 'fonts/[name].[ext]',
              outputPath: 'static'
            }
          }
        ]
      }

Files with the extension woff2 must also be regularly matched

Menu