Sergio Salami
Sergio Salami
KPCKevin Powell - Community
Created by Sergio Salami on 1/29/2024 in #front-end
Sass Error: Module loop: this module is already being loaded.
Another example: Let’s say you have files A, B, and C, where - A forwards B and C - B uses C - C uses B. Partials A, B, C are in the same folder “abstracts”. _index.scss (A) forwards _global.scss (B) and _unit.scss (C). _global.scss (B) “uses” sass-functions from _unit.scss (C). And _unit.scss (C) “uses” global variables from _globals.scss (B). How is this possible? 🤯 I also want to use parts of B and C in D which could be another partial that lives somewhere else (for instance, _cards.scss in components folder). So I would load A with @use "abstracts" as * (which forwards B and C) to access variables/functions/mixins from both B and C.
2 replies