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 am trying to incorporate the media-query-plugin into our Webpack build but it is not working as expected, and I'm wondering if there something obvious that I am doing wrong or missing, or if it's a bug?
The problem is with css-loader options not being applied to media query files. Specifically I use the modules option and set localIdentname in css-loader. This works correctly for rules in the non-media query bundle:
.Button__default__1OhNF {
...
}
but rules in the extracted media query bundles are not getting modified:
@media screen and (min-width:960px) {
.container--slim>div {
...
}
Hi @SassNinja, thanks for the update and for confirming that this is a bug.
As an aside, I also looked at https://github.com/mike-diamond/media-query-splitting-plugin which splits and generates the media query files after the loader has been applied. I needed to rework it a bit, as the configuration doesn't suit a mobile first approach, but it may be a way around the loader issue. I did encounter a problem with our CSS nested in @supports rules not being extracted, and haven't taken it any further.
Hi,
I am trying to incorporate the
media-query-plugin
into our Webpack build but it is not working as expected, and I'm wondering if there something obvious that I am doing wrong or missing, or if it's a bug?The problem is with
css-loader
options not being applied to media query files. Specifically I use themodules
option and setlocalIdentname
incss-loader
. This works correctly for rules in the non-media query bundle:.Button__default__1OhNF { ... }
but rules in the extracted media query bundles are not getting modified:
This is what my config looks like:
Thanks.
The text was updated successfully, but these errors were encountered: