title: Configure NG-Zorro with Sass instead of Less
body: <p>Does anyone have experience setting up NG-Zorro in an Angular project with SCSS styles?
  I'm trying to do that with <strong>antd-scss-theme-plugin</strong> but it seems that I'm missing something.</p>
  <p>There is no error, by the documentation it should override less variables in the <strong>theme.scss</strong> file but nothing happens.</p>
  <p>Take a look at the code.</p>
  <p><strong>webpack.config.js</strong></p>
  <pre><code>const path = require(&quot;path&quot;);
  
  
  const AntdScssThemePlugin = require(&quot;antd-scss-theme-plugin&quot;);
  
  const config = {
    module: {
      rules: [
        {
          test: /\.scss$/,
          include: [path.resolve(__dirname, &quot;not_exist_path&quot;)],
          exclude: /node_modules/,
          use: [
            {
              loader: &quot;style-loader&quot;,
            },
            {
              loader: &quot;css-loader&quot;,
            },
            AntdScssThemePlugin.themify({
              loader: &quot;sass-loader&quot;,
              options: {
                sourceMap: process.env.NODE_ENV !== 'production',
              },
            }),
          ],
        },
        {
          test: /\.less$/,
          include: [path.resolve(__dirname, &quot;not_exist_path&quot;)],
          use: [
            {
              loader: 'style-loader',
              options: {
                sourceMap: process.env.NODE_ENV !== 'production',
              },
            },
            {
              loader: 'css-loader',
              options: {
                importLoaders: 1,
                sourceMap: process.env.NODE_ENV !== 'production',
              },
            },
            AntdScssThemePlugin.themify('less-loader'),
          ],
        },
      ],
    },
    plugins: [
      new AntdScssThemePlugin(path.resolve(__dirname, 'src', 'assets/theme.scss')),
  ],
  watchOptions: {
    ignored: /dist/,
  },
  };
  
  module.exports = config;
  </code></pre>
  <p><strong>angular.json</strong></p>
  <pre><code>  &quot;$schema&quot;: &quot;./node_modules/@angular/cli/lib/config/schema.json&quot;,
    &quot;version&quot;: 1,
    &quot;newProjectRoot&quot;: &quot;projects&quot;,
    &quot;projects&quot;: {
      &quot;ng-zorro-themes&quot;: {
        &quot;projectType&quot;: &quot;application&quot;,
        &quot;schematics&quot;: {
          &quot;@schematics/angular:component&quot;: {
            &quot;style&quot;: &quot;scss&quot;
          }
        },
        &quot;root&quot;: &quot;&quot;,
        &quot;sourceRoot&quot;: &quot;src&quot;,
        &quot;prefix&quot;: &quot;app&quot;,
        &quot;architect&quot;: {
          &quot;build&quot;: {
            &quot;builder&quot;: &quot;@angular-builders/custom-webpack:browser&quot;,
            &quot;options&quot;: {
              &quot;customWebpackConfig&quot;: {
                &quot;path&quot;: &quot;./webpack.config.js&quot;,
                &quot;browserTarget&quot;: &quot;ng-zorro-themes:build&quot;
              },
              &quot;outputPath&quot;: &quot;dist/ng-zorro-themes&quot;,
              &quot;index&quot;: &quot;src/index.html&quot;,
              &quot;main&quot;: &quot;src/main.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.app.json&quot;,
              &quot;aot&quot;: true,
              &quot;assets&quot;: [&quot;src/favicon.ico&quot;, &quot;src/assets&quot;],
              &quot;styles&quot;: [
                &quot;src/styles.scss&quot;,
                &quot;node_modules/ng-zorro-antd/ng-zorro-antd.less&quot;
              ],
              &quot;scripts&quot;: []
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;fileReplacements&quot;: [
                  {
                    &quot;replace&quot;: &quot;src/environments/environment.ts&quot;,
                    &quot;with&quot;: &quot;src/environments/environment.prod.ts&quot;
                  }
                ],
                &quot;optimization&quot;: true,
                &quot;outputHashing&quot;: &quot;all&quot;,
                &quot;sourceMap&quot;: false,
                &quot;extractCss&quot;: true,
                &quot;namedChunks&quot;: false,
                &quot;extractLicenses&quot;: true,
                &quot;vendorChunk&quot;: false,
                &quot;buildOptimizer&quot;: true,
                &quot;budgets&quot;: [
                  {
                    &quot;type&quot;: &quot;initial&quot;,
                    &quot;maximumWarning&quot;: &quot;2mb&quot;,
                    &quot;maximumError&quot;: &quot;5mb&quot;
                  },
                  {
                    &quot;type&quot;: &quot;anyComponentStyle&quot;,
                    &quot;maximumWarning&quot;: &quot;6kb&quot;,
                    &quot;maximumError&quot;: &quot;10kb&quot;
                  }
                ]
              }
            }
          },
          &quot;serve&quot;: {
            &quot;builder&quot;: &quot;@angular-builders/custom-webpack:dev-server&quot;,
            &quot;options&quot;: {
              &quot;customWebpackConfig&quot;: {
                &quot;path&quot;: &quot;./webpack.config.js&quot;
              },
              &quot;browserTarget&quot;: &quot;ng-zorro-themes:build&quot;
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;browserTarget&quot;: &quot;ng-zorro-themes:build:production&quot;
              }
            }
          },
          &quot;extract-i18n&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:extract-i18n&quot;,
            &quot;options&quot;: {
              &quot;browserTarget&quot;: &quot;ng-zorro-themes:build&quot;
            }
          },
          &quot;test&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:karma&quot;,
            &quot;options&quot;: {
              &quot;main&quot;: &quot;src/test.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.spec.json&quot;,
              &quot;karmaConfig&quot;: &quot;karma.conf.js&quot;,
              &quot;assets&quot;: [&quot;src/favicon.ico&quot;, &quot;src/assets&quot;],
              &quot;styles&quot;: [&quot;src/styles.scss&quot;],
              &quot;scripts&quot;: []
            }
          },
          &quot;lint&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:tslint&quot;,
            &quot;options&quot;: {
              &quot;tsConfig&quot;: [
                &quot;tsconfig.app.json&quot;,
                &quot;tsconfig.spec.json&quot;,
                &quot;e2e/tsconfig.json&quot;
              ],
              &quot;exclude&quot;: [&quot;**/node_modules/**&quot;]
            }
          },
          &quot;e2e&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:protractor&quot;,
            &quot;options&quot;: {
              &quot;protractorConfig&quot;: &quot;e2e/protractor.conf.js&quot;,
              &quot;devServerTarget&quot;: &quot;ng-zorro-themes:serve&quot;
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;devServerTarget&quot;: &quot;ng-zorro-themes:serve:production&quot;
              }
            }
          }
        }
      }
    },
    &quot;defaultProject&quot;: &quot;ng-zorro-themes&quot;
  }
  </code></pre>
  <p><strong>theme.scss</strong></p>
  <p><code>$primary-color: red;</code></p>
  <p><strong>package.json</strong></p>
  <pre><code>  &quot;name&quot;: &quot;ng-zorro-themes&quot;,
    &quot;version&quot;: &quot;0.0.0&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;test&quot;: &quot;ng test&quot;,
      &quot;lint&quot;: &quot;ng lint&quot;,
      &quot;e2e&quot;: &quot;ng e2e&quot;
    },
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/common&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/compiler&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/core&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/forms&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~10.0.5&quot;,
      &quot;@angular/router&quot;: &quot;~10.0.5&quot;,
      &quot;add&quot;: &quot;^2.0.6&quot;,
      &quot;ng-zorro-antd&quot;: &quot;^9.3.0&quot;,
      &quot;rxjs&quot;: &quot;~6.5.5&quot;,
      &quot;sass-loader&quot;: &quot;^7.0.1&quot;,
      &quot;tslib&quot;: &quot;^2.0.0&quot;,
      &quot;zone.js&quot;: &quot;~0.10.3&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-builders/custom-webpack&quot;: &quot;^10.0.0&quot;,
      &quot;@angular-devkit/build-angular&quot;: &quot;~0.1000.4&quot;,
      &quot;@angular/cli&quot;: &quot;~10.0.4&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;~10.0.5&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.5.0&quot;,
      &quot;@types/jasminewd2&quot;: &quot;~2.0.3&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;antd-scss-theme-plugin&quot;: &quot;^1.0.8&quot;,
      &quot;babel-plugin-import&quot;: &quot;^1.13.0&quot;,
      &quot;codelyzer&quot;: &quot;^6.0.0&quot;,
      &quot;css-loader&quot;: &quot;^4.1.1&quot;,
      &quot;html-webpack-plugin&quot;: &quot;^4.3.0&quot;,
      &quot;jasmine-core&quot;: &quot;~3.5.0&quot;,
      &quot;jasmine-spec-reporter&quot;: &quot;~5.0.0&quot;,
      &quot;karma&quot;: &quot;~5.0.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage-istanbul-reporter&quot;: &quot;~3.0.2&quot;,
      &quot;karma-jasmine&quot;: &quot;~3.3.0&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;^1.5.0&quot;,
      &quot;less-loader&quot;: &quot;^5.0.0&quot;,
      &quot;mini-css-extract-plugin&quot;: &quot;^0.9.0&quot;,
      &quot;node-sass&quot;: &quot;^4.14.1&quot;,
      &quot;protractor&quot;: &quot;~7.0.0&quot;,
      &quot;style-loader&quot;: &quot;^1.2.1&quot;,
      &quot;ts-node&quot;: &quot;~8.3.0&quot;,
      &quot;tslint&quot;: &quot;~6.1.0&quot;,
      &quot;typescript&quot;: &quot;~3.9.5&quot;
    }
  }
  </code></pre>