I'm using less-loader to load less into css. Then I use typings-for-css-modules-loader to get class name constants in TypeScript.
The problem is that I develop raw markup at first. During developing of mark-up I create empty rulesets in LESS to get class name constants and use them in mark-up. But because LESS ignores empty rulesets constants are not generated.
When I add any styles into ruleset constants are generated properly.
For example:
.tooltip { // constant "tooltip" is generated
display: none;
&__name { // constant "tooltipName" is generated
color: inherit;
}
&__id { // constant "tooltipId" is NOT generated
}
}
I can add some dummy styles into every new ruleset but it would be annoying.
I use WebPack, ReactJS and TypeScript. I'm looking for some config I can use in webpack.config to change this behavior.