title: Inline all html tags with appropriate style from a stylesheet using html-inline-css-webpack-plugin
body: <p>In order to send email from an application I develop, due to smtp client restrictions,
  I would like to inline every style class from my CSS in each tags in my final html template using Webpack. In my case I can inline all the stylesheet in the one  div but my aim is to get every tag of the style to be filled with the appropriate style.</p>
  <p>Here is my webpack.config :</p>
  <pre><code>const HtmlWebpackPlugin = require('html-webpack-plugin');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  const { CleanWebpackPlugin } = require('clean-webpack-plugin');
  const HTMLInlineCSSWebpackPlugin = require(&quot;html-inline-css-webpack-plugin&quot;).default;
  
  
  module.exports = {
      mode: 'development',
      entry: [
          './src/main.js',
      ],
      plugins: [
          new CleanWebpackPlugin(),
          new MiniCssExtractPlugin({
              filename: '[name].css',
          }),
          new HtmlWebpackPlugin({
              filename: 'review.html',
              template: './src/templates/models/review.pug',
          }),
          new HtmlWebpackPlugin({
              filename: 'access_request.html',
              template: './src/templates/models/domain_access_request.pug',
          }),
          new HtmlWebpackPlugin({
              filename: 'analytics_alert.html',
              template: './src/templates/models/analytics_alert.pug',
          }),
          new HtmlWebpackPlugin({
              filename: 'battery_pb.html',
              template: './src/templates/models/battery_pb.pug',
          }),
          new HtmlWebpackPlugin({
              filename: 'deco_module_cloud.html',
              template: './src/templates/models/deco_module_cloud.pug',
          }),
          new HtmlWebpackPlugin({
              filename: 'stock_pb.html',
              template: './src/templates/models/stock_pb.pug',
          }),
          new HTMLInlineCSSWebpackPlugin({
              replace: {
                  target: 'tbody',
                  removeTarget:true
              }
          }),
  
      ],
      output: {
          filename: '[name].js',
          path: path.resolve(__dirname, 'dist'),
      },
      module: {
        rules: [
          {
            test: /\.scss$/i,
            use: [
                MiniCssExtractPlugin.loader,
            {
                loader: 'css-loader',
            },
              {
                  loader: 'sass-loader'
              }
            ],
          },
            {
            test: /\.css$/,
            use: [
                MiniCssExtractPlugin.loader,
                {
                loader: 'css-loader',
                    options: {
                        sourceMap: true,
                        minimize: true,
                        includePaths: [
                            path.resolve(__dirname, './src/templates/assets/scss')
                        ]
                    }
                },
            ],
          },
          {
            test: /\.pug$/,
            use: [
              'pug-loader'
            ],
          },
          {
            test: /\.(png|svg|jpg|gif)$/,
            use: [
              'file-loader',
            ],
          },
        ],
      },
  }; 
  </code></pre>
  <p>Hope you understood my issue.</p>