I generate a custom theme from Material Theme Generator
My theme is something like
@use '@angular/material' as mat;
@import 'https://fonts.googleapis.com/css?family=Material+Icons';
@import url('https://fonts.googleapis.com/css?family=Amiri:300,400,500');
$fontConfig: (
display-4: mat.define-typography-level(52px, 56px, 300, 'Amiri', -0.0288em),
display-3: mat.define-typography-level(38px, 38px, 400, 'Amiri', -0.0132em),
display-2: mat.define-typography-level(32px, 36px, 400, 'Amiri', 0em),
display-1: mat.define-typography-level(28px, 32px, 400, 'Amiri', 0.0089em),
headline: mat.define-typography-level(24px, 32px, 400, 'Amiri', 0em),
title: mat.define-typography-level(20px, 32px, 500, 'Amiri', 0.0075em),
subheading-2: mat.define-typography-level(16px, 28px, 400, 'Amiri', 0.0094em),
subheading-1: mat.define-typography-level(15px, 24px, 500, 'Amiri', 0.0067em),
body-2: mat.define-typography-level(14px, 24px, 500, 'Amiri', 0.0179em),
body-1: mat.define-typography-level(14px, 20px, 400, 'Amiri', 0.0179em),
button: mat.define-typography-level(14px, 14px, 500, 'Amiri', 0.0893em),
caption: mat.define-typography-level(12px, 20px, 400, 'Amiri', 0.0333em),
input: mat.define-typography-level(inherit, 1.125, 400, 'Amiri', 1.5px),
);
@include mat.core($fontConfig);
I have removed other configurations to only the lines that throw the below error
./apps/my-project/src/theme/custom.theme.scss - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Only 0 arguments allowed, but 1 was passed.
┌──> apps\my-project\src\theme\custom.theme.scss
33│ @include mat.core($fontConfig);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invocation
╵
┌──> node_modules\@angular\material\core\_core.scss
8 │ @mixin core() {
│ ━━━━━━ declaration
╵
apps\my-project\src\theme\custom.theme.scss 33:1 core()
apps\my-project\src\theme\custom.theme.scss 33:1 root stylesheet
./apps/my-project/src/theme/custom.theme.scss?ngGlobalStyle - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Only 0 arguments allowed, but 1 was passed.
┌──> apps\my-project\src\theme\custom.theme.scss
33│ @include mat.core($fontConfig);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invocation
╵
┌──> node_modules\@angular\material\core\_core.scss
8 │ @mixin core() {
│ ━━━━━━ declaration
╵
apps\my-project\src\theme\custom.theme.scss 33:1 core()
apps\my-project\src\theme\custom.theme.scss 33:1 root stylesheet
The app was running well but after an upgrade to angular 15, the above error started appearing