Skip to content

Conversation

@javiereguiluz
Copy link
Member

Without this change, I don't see any styles on the app and the server shows this:

[Application] Nov  4 14:19:23 |CRITICA| REQUES Uncaught PHP Exception 
Symfony\Component\AssetMapper\Exception\RuntimeException:
"Unable to find asset "./bootswatch/_variables" referenced in "demo/assets/styles/_variables.scss". 
The file "demo/assets/styles/bootswatch/_variables" does not exist."
at CssAssetUrlCompiler.php line 111

@stof
Copy link
Member

stof commented Nov 4, 2025

As discussed in symfony/symfony#62195, the changes done in Symfony 7.4 to support all syntaxes for CSS imports are breaking things for SassBundle which was relying on the fact that the way Sass imports are defined was not matched by the regex of CSS (which is not true anymore) and has not been adapted.

As I commented in this issue, there is a workaround for that. If you use Sass modules (i.e. using @use instead of @import in your Sass files), you won't be impacted by the issue (as this @use at-rule won't look like a CSS import at all). And at the same time, it will use the recommended Sass syntax (using @import in Sass is deprecated).
However, I'm not sure Bootswatch supports using modules yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants