-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
If a class name conflicts with a JS keyword (for example, ".class"), css-loader will output it differently:
export { _1 as "class" };You can use the regex /export { [_a-z0-9]+ as ("[^\\"]+") }/g to find these. You'll probably need to export them the same way.
In seek-oss/css-modules-typescript-loader#50 the workaround was to export sorta similar to the non-namedExport version:
interface CssExports {
'class': string;
}
export const cssExports: CssExports;
export = cssExports;The key being the export = cssExports; line which exports all the properties of CssExports individually.
This actually comes up quite a lot given how many keywords there are in JS.
Metadata
Metadata
Assignees
Labels
No labels