css-modules-typescript-loader icon indicating copy to clipboard operation
css-modules-typescript-loader copied to clipboard

Support named exports

Open danieljuhl opened this issue 5 years ago • 3 comments

Closes #37

It has one known limitation. Exported class names has to JS safe - eg. we can't use dash in class names.

danieljuhl avatar Mar 14 '20 19:03 danieljuhl

If the concept / design is accepted, I'm happy to create tests and documentation.

The default behaviour was changed in #9, but I suggest to add this as a feature, and let the user of this plugin decide, if they want default or named exports (with its limitations).

danieljuhl avatar Mar 14 '20 19:03 danieljuhl

I submitted a bug report to TypeScript about lack of support for string literal exports, since this is a feature in plain JavaScript: microsoft/TypeScript#56200

laverdet avatar Oct 24 '23 06:10 laverdet

Got a comment with a pointer to another issue. I believe you can export raw string names via export = . I'll give it a shot in our project and follow up later.

laverdet avatar Oct 24 '23 07:10 laverdet