Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Add default export to definition file #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sarink
Copy link

@sarink sarink commented Dec 4, 2017

Fixes #20.

When using the style-loader, the generated locals object gets invisibly murdered for unknown reasons.

If someone's not using the style-loader they can still import {locals} just fine, and if they are using the style-loader (honestly, who isn't?), they can use the default export.

This should make everyone happy, and be fully backwards-compatible.

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.
@sarink
Copy link
Author

sarink commented Dec 5, 2017

@timse @jimdo-tiff ?

@jpstevens
Copy link

@timse @jimdo-tiff can we get this merged done please?

@sarink
Copy link
Author

sarink commented Feb 22, 2018

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

@zenyr
Copy link

zenyr commented Feb 25, 2018

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:

yarn remove typings-for-css-modules-loader (if necessary)
yarn add sarink/typings-for-css-modules-loader#4ba358d -D

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.

@sarink
Copy link
Author

sarink commented Feb 28, 2018

Or for the regular ol npm package.json guys

"typings-for-css-modules-loader": "git://github.com/sarink/typings-for-css-modules-loader.git#master",

@sarink
Copy link
Author

sarink commented Apr 4, 2018

@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!

@immortal-tofu
Copy link

Merge ? We need this and thanks @sarink <3

@plusgut
Copy link

plusgut commented May 28, 2018

@timse @jimdo-tiff i would like to see that pr merged as well

jpavon added a commit to jpavon/typings-for-css-modules-loader that referenced this pull request Jun 24, 2018
@jpavon
Copy link

jpavon commented Jun 24, 2018

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/

@desfero
Copy link

desfero commented Sep 29, 2018

any progress?

@plusgut
Copy link

plusgut commented Oct 25, 2018

@timse @jimdo-bot any comment?

@ifmos
Copy link

ifmos commented Jan 7, 2019

@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

@JiangWeixian
Copy link

you can use below in options

namedExport: true,
silent: true,

we dont need export default anymore

@alexeychikk
Copy link

@JiangWeixian This doesn't help if you have default imports like import classes from "blabla.scss" and additionally it wipes out all non-camelcased css classes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated typings not compatible with project
10 participants