Webpack и Pug. Ошибка компиляции проекта

ERROR webpack.config

const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = {
    entry: {
        main: path.resolve(__dirname, './src/pages/index/index.js'),
    },
    output: {
        filename: '[name].bundle.js',
        path: path.resolve(__dirname, './docs'),
    },
    devServer: {
        open: true,
    },
    module: {
        rules: [
            {
                test: /\.pug$/,
                loader: 'pug-plain-loader',
                options: {
                    pretty: true,
                },
            },
            {
                test: /\.(sa|sc|c)ss$/,
                use: [
                    MiniCssExtractPlugin.loader,
                    'css-loader',
                    'postcss-loader',
                ],
            },
        ],
    },
    plugins: [
        new MiniCssExtractPlugin(),
        new HtmlWebpackPlugin({
            title: 'title',
            template: path.resolve(__dirname, './src/pages/index/index.pug'),
            filename: 'index.html',
        }),
    ],
}

package

  "main": "index.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1",
        "start": "webpack-dev-server --mode development",
        "build": "webpack"
      },
      "keywords": [],
      "author": "",
      "license": "ISC",
      "devDependencies": {
        "css-loader": "^6.5.0",
        "file-loader": "^6.2.0",
        "html-webpack-plugin": "^5.5.0",
        "mini-css-extract-plugin": "^2.4.3",
        "node-sass": "^6.0.1",
        "postcss-loader": "^6.2.0",
        "pug": "^3.0.2",
        "pug-plain-loader": "^1.1.0",
        "resolve-url-loader": "^4.0.0",
        "sass-loader": "^12.3.0",
        "webpack": "^5.61.0",
        "webpack-cli": "^4.9.1",
        "webpack-dev-server": "^4.4.0"
      }
    }

Ответы (0 шт):