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 have a custom CSS pre-processor and webpack loader (gss). It is configurable via query strings - for example import headerStyle from 'gss?config=headerStyle.json!navbar.gss';. css-loader is set as a postloader in my webpack config.
This works perfectly, the navbar is configured to look like a header and headerStyle is an object with my hashed classes. The issue appears when the stylesheet is used multiple times. footer.js contains: import footerStyle from 'gss?config=footerStyle.json!navbar.gss';.
In this case both stylesheets are correctly generated and appear in the resulting CSS file, however the objects footerStyle and headerStyle are identical, they both point to the last sheet that was loaded.
Is it possible to make css-loader resolve files based on the entire require string rather than just the filename?
The text was updated successfully, but these errors were encountered:
I have a custom CSS pre-processor and webpack loader (gss). It is configurable via query strings - for example
import headerStyle from 'gss?config=headerStyle.json!navbar.gss';
.css-loader
is set as a postloader in my webpack config.This works perfectly, the navbar is configured to look like a header and headerStyle is an object with my hashed classes. The issue appears when the stylesheet is used multiple times.
footer.js
contains:import footerStyle from 'gss?config=footerStyle.json!navbar.gss';
.In this case both stylesheets are correctly generated and appear in the resulting CSS file, however the objects
footerStyle
andheaderStyle
are identical, they both point to the last sheet that was loaded.Is it possible to make
css-loader
resolve files based on the entire require string rather than just the filename?The text was updated successfully, but these errors were encountered: