text: const path = require('path');
  const HtmlWebPackPlugin = require('html-webpack-plugin');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  
  module.exports = {
    mode: 'development',
    entry: './src/index.js',
  
    output: {
      publicPath: '/',
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'dist'),
      assetModuleFilename: 'assets/images/[hash][ext][query]',
    },
  
    resolve: {
      extensions: ['.js', '.jsx'],
      alias: {
        '@styles': path.resolve(__dirname, 'src/styles/components/'),
        '@components': path.resolve(__dirname, 'src/components/'),
        '@containers': path.resolve(__dirname, 'src/containers/'),
        '@static': path.resolve(__dirname, 'src/assets/static/'),
        '@mainStyles': path.resolve(__dirname, 'src/styles/'),
        '@img': path.resolve(__dirname, 'src/assets/img/'),
        '@hooks': path.resolve(__dirname, 'src/hooks/'),
      },
    },
  
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
        {
          test: /\.html$/,
          use: [
            {
              loader: 'html-loader',
            },
          ],
        },
        {
          test: /\.less$/i,
          use: [
            {
              loader: MiniCssExtractPlugin.loader,
            },
            'css-loader',
            'less-loader',
          ],
        },
        {
          test: /\.(png|gif|jpg|svg|ico)$/,
          type: 'asset',
        },
      ],
    },
  
    plugins: [
      new HtmlWebPackPlugin({
        template: './public/index.html',
        filename: './index.html',
      }),
      new MiniCssExtractPlugin({
        filename: 'assets/[name].css',
      }),
    ],
  
    devServer: {
      static: path.join(__dirname, 'dist'),
      historyApiFallback: true,
      compress: true,
      port: 3006,
      open: true,
    },
  };
  