-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preprocessCss
is no longer run on composed files
#115
Comments
Finally! that's the crux of the matter I've been struggling with for 2 days... Thanks @willdawsonme! My setup runs exclusively on Perhaps it wouldn't be the case if it was different setup. In my case it's modules nesting that produce such results. P.S. I use require hook only for testing purposes. |
This issue: css-modules#115 The version v4.2.2 introduced a breaking change for people relying on `processCss` option. The actual reason was that since that version "postcss-modules-resolve-imports" combined separate CSS into single CSS prior to triggering processCss callback, if any was provided. Up to 4.2.1 the behavior was different, and processCss was called on each individual file. This patch, if `processCss` callback is provided, with a help of additional simple plugin, records separate compiled CSS files, and then passes them to `processCss` callback individually, with the same order as before. As of now, I am not sure it solves the issue in all corner cases, but at least with this patch `babel-plugin-css-modules-transform` passes all its functional tests when upgraded to the v4.3.1 of `css-modules-require-hook`.
If anybody is still interested, I presumably fixed this in my fork of the library, published to NPM: https://www.npmjs.com/package/@dr.pogodin/css-modules-require-hook |
Since css-modules-require-hook started using postcss-modules-resolve-imports (v4.2.2),
preprocessCss
is no longer being called on composed files, which makes using this module with stylus impossible if you usecomposes
.For example, this:
should give me:
but instead I get:
because page.styl isn't being preprocessed before postcss is run.
The text was updated successfully, but these errors were encountered: