'SassError: expected "{"

Error image see here

Hi everyone. Im trying to build my project, which contains main.scss file and after running npm run build command get an error like above image.

Also this is my webpack configuration

const path = require("path");
module.exports = {
  mode: "development",
  entry: {
    bundle: path.resolve(__dirname, "src/index.js"),
  },
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "[name].js",
  },
  module: {
    rules: [
      {
        test: /\.scss$/,
        use: ["style-loader", "sass-loader", "css-loader"],
      },
    ],
  },
};


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source