You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this with modular-css and had to fix it by splitting up value-processing into a two-pass thing, where it does local values (like @value foo: "./foo.css";) first and then processing values/compositions imported from other files.
/* styles.css */@value colors:"../colors.css";
@value primary, secondary from colors;
/* the following works */
.header {
background-color: primary;
}
/* the following results in error */
.header {
composes: primaryColor from colors;
}
Error message: "Module build failed: referenced class name "primaryClass" in composes not found"
EDIT:
I think what's happening is related to the things discussed in Evaneos/vitaminjs#261 - I realized I was getting values feature from simply using css-modules and not even using a post-css loader. After adding postcss correctly, it still gave me the error until I tried this:
Activity
josephrexme commentedon Mar 27, 2017
I have the exact same issue. I had to compose directly from the path:
and in the case of inheriting the variable name
tivac commentedon Mar 27, 2017
I ran into this with
modular-cssand had to fix it by splitting up value-processing into a two-pass thing, where it does local values (like@value foo: "./foo.css";) first and then processing values/compositions imported from other files.Kinda of a PITA, but it worked out ok.
DavideDaniel commentedon Apr 12, 2017
yep, same...
then:
Error message:
"Module build failed: referenced class name "primaryClass" in composes not found"EDIT:
I think what's happening is related to the things discussed in Evaneos/vitaminjs#261 - I realized I was getting values feature from simply using css-modules and not even using a post-css loader. After adding postcss correctly, it still gave me the error until I tried this:
Solution: