Closed terebentina closed 2 years ago
hmm I'm surprised that this is being used directly in code, I thought it was more of an intermediary representation used by the css modules compiler.
I guess we can just fall back to postcss-modules when these are seen like we already do for e.g. @value
. I don't have plans to support that syntax in the new CSS compiler however, so this will not be optimized performance wise.
🐛 bug report
The css modules specs has a section for interop with js or other css modules. More precisely, it defines an
:export
keyword that exports strings/variables (not css variables), functionally equivalent to this js:I am using it like this:
// cssVars.module.scss:
// file.js:
More details: https://github.com/css-modules/icss/blob/master/README.md#export
This works in parcel 2.3.2 but it doesn't in parcel 2.4.0.
🎛 Configuration (.babelrc, package.json, cli command)
package.json deps :
.parcelrc
.postcssrc
🤔 Expected Behavior
console.log(cssVars.playReqs);
above should output the value forplayReqs
defined in the css module file. It does so with parcel 2.3.2 (and all the other parcel deps on 2.3.2)😯 Current Behavior
The above console log returns
undefined
.