angularsasssass-loaderwebpack-3

Module Build Failed. TypeError: this.getResolve is not a function


I am getting this error when compiling sass.

webpack: 3.12.0, sass-loader: 8.0.0.

Also, I use angular2.

     {
        test: /\.(scss|sass)$/,
        use: [
          "to-string-loader",
          {
            loader: "css-loader",
            options: {
              sourceMap: false
            }
          },
          {
            loader: "sass-loader",
              options: {
                  sourceMap: false
              }
            }
        ]
      }

Solution

  • Probably a SASS/Webpack compatibility issue. Downgrading to "sass-loader": "^7.3.1", solved it for me.