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
Similar to #207, we have a project using typescript-plugin-css-modules@5.1.0 (and all default plugin options usage), in it, we use CSS Modules exclusively with named exports.
There seem to be different numbers of exports between the default and namedExports.
To Reproduce
Steps to reproduce the behavior:
Using typescript-plugin-css-modules@5.1.0 and typescript@5.4.3.
import*assColorsfrom'./theme-colors.module.css';import*assLayoutfrom'./theme-layout.module.css';import*assMiscfrom'./theme-misc.module.css';import*assShadowfrom'./theme-shadow.module.css';import*assSpacingfrom'./theme-spacing.module.css';import*assTextfrom'./theme-text.module.css';import*assTypofrom'./theme-typography.module.css';consts={...sColors, ...sMisc, ...sTypo, ...sText, ...sLayout, ...sShadow, ...sSpacing};exportfunctionthemeCx(props: AllTokens): string{constnormalized=normalize(props);returncx(s,normalized);}// s has ~40ish keys on the default export and ~268 named exports besides default
edit: I remembered that adding composes to a css module makes the types for plugin's named exports stop working. There's only a default export in that case and no namedExports.
Expected behavior
Adding composes should continue exporting namedExports from the CSS modules they're contained in.
Desktop (please complete the following information):
OS: macOS 14.5
Node Version: 20.12
The text was updated successfully, but these errors were encountered:
Describe the bug
Similar to #207, we have a project using
typescript-plugin-css-modules@5.1.0
(and all default pluginoptions
usage), in it, we use CSS Modules exclusively with named exports.There seem to be different numbers of exports between the
default
andnamedExports
.To Reproduce
Steps to reproduce the behavior:
typescript-plugin-css-modules@5.1.0
andtypescript@5.4.3
.composes
to a css module makes the types for plugin's named exports stop working. There's only a default export in that case and no namedExports.Expected behavior
Adding
composes
should continue exportingnamedExports
from the CSS modules they're contained in.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: