Skip to content

Compiler can't work with google font link (material theme) #1324

@MelBou

Description

@MelBou

Hi,
I upgraded my angular project to version 19. I upgraded bootstrap and bootswatch to version 5.3.3 as well.
Since then, I can't compile my project, I always get this error message :

`X [ERROR] Could not resolve "../../../node_modules/bootswatch/dist/materia||file:https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"

    src/assets/styles/styles.scss:7:12:
      7 │ @import url("../../../node_modules/bootswatch/dist/materia||file:ht...`

If I change _bootswatch.scss code from :

`// Variables

$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default;
@if $web-font-path {
  @import url("#{$web-font-path}");
}`

to

`// Variables

$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default;
@if $web-font-path {
  @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");
}`

the problem is solved.

Am I missing something here ?
Thanks for your help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions