-
Couldn't load subscription status.
- Fork 71
Add default export to definition file #51
base: master
Are you sure you want to change the base?
Conversation
When using the `style-loader`, the `locals` object gets invisibly murdered. Fixes Jimdo#20. If someone's not using the `style-loader` they can `import {locals}`, and if they _are_ using the `style-loader`, they can use the default import. This should make everyone happy, and be fully backwards-compatible.
|
@timse @jimdo-tiff can we get this merged done please? |
|
For those interested, you can use my fork for the time being: https://github.com/sarink/typings-for-css-modules-loader It is up-to-date with the latest code in this repo, plus the one line from this PR |
|
Thanks for the PR, I was also confused a bit. For someone who wants to know how to use @sarink's "forked" version prior to the merge, you can: However this is not very deterministic -- say, when the repo goes away etc. -- so you'd better subscribe to this PR and replace back to the original npm repo. This is not a permanent solution. |
|
Or for the regular ol npm |
|
@timse @jimdo-tiff cmon guys, it's been 4 months... this change is completely safe, fully backwards-compatible, and only 1 line of code to review! |
|
Merge ? We need this and thanks @sarink <3 |
|
@timse @jimdo-tiff i would like to see that pr merged as well |
|
I also want this pull request, I forked it and put it in npm if anyone wants to use it https://github.com/jpavon/typings-for-css-modules-loader/ |
|
any progress? |
|
@timse @jimdo-bot any comment? |
|
@sarink, I want this pr too, maybe you could publish it as a new npm package which could be named typings-for-css-modules-loader2 XD |
|
you can use below in options namedExport: true,
silent: true,we dont need |
|
@JiangWeixian This doesn't help if you have default imports like |
Fixes #20.
When using the
style-loader, the generatedlocalsobject gets invisibly murdered for unknown reasons.If someone's not using the
style-loaderthey can stillimport {locals}just fine, and if they are using thestyle-loader(honestly, who isn't?), they can use the default export.This should make everyone happy, and be fully backwards-compatible.