Jimdo / typings-for-css-modules-loader

Drop-in replacement for css-loader to generate typings for your CSS-Modules on the fly in webpack
573 stars 71 forks source link

No default export, problem with export locals - can't use full classNames #87

Open SatarisGIT opened 5 years ago

SatarisGIT commented 5 years ago

Hello!

I have problem with newest version of this loader.

Loader working great, but dont generate "export default locals;" string.

export interface IMonitoringHeaderModuleScss {
  'header': string;
  'header__header_element': string;
  'headerHeaderElement': string;
  'header__header_element--modifier': string;
  'headerHeaderElementModifier': string;
}

export const locals: IMonitoringHeaderModuleScss;`

So I cant use any styles from it beacuse my styles when I import them

import styles from './MonitoringHeader.module.scss';

lands DIRECTLY in "styles" object, not "styles.locals"...

I dont like namedExport with camelCase - generated names look really bad with BEM convention.

ztolley commented 5 years ago

Same here +1

dmnn commented 5 years ago

+1

nickpape commented 5 years ago

Yep, I am having this issue too. I will try downgrading and seeing if that resolves issue.