text: const TerserPlugin = require("terser-webpack-plugin");
  const { DefinePlugin } = require('webpack');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  
  module.exports = {
      mode: 'production',
      output: {
          filename: '[name].[chunkhash:4].js'
      },
      plugins: [
          new DefinePlugin({
              'process.env': {
                  'NODE_ENV': JSON.stringify('production'),
              }
          }),
          new MiniCssExtractPlugin({
              filename: '[name].[chunkhash:4].css',
              chunkFilename: '[id].[chunkhash:4].css',
          })
      ],
      optimization: {
          minimize: true,
          minimizer: [
              new TerserPlugin({
                  terserOptions: {
                      format: {
                          comments: false,
                      },
                  },
                  extractComments: false,
              }),
          ],
      }
  };
  