Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate typed-css-modules #47

Open
mohsen1 opened this issue Jul 17, 2018 · 7 comments
Open

Integrate typed-css-modules #47

mohsen1 opened this issue Jul 17, 2018 · 7 comments

Comments

@mohsen1
Copy link

mohsen1 commented Jul 17, 2018

Would you accept a pull request to add support for typed-css-modules or you think that should be a different plugin on its own?

Related to Quramy/typed-css-modules#51

@fathyb
Copy link
Owner

fathyb commented Jul 19, 2018

👍 it would be more than welcome, let me know if you need any help

@Place1
Copy link

Place1 commented Aug 9, 2018

I've implemented this over at https://github.com/place1/parcel-plugin-typed-css-modules

@mohsen1
Copy link
Author

mohsen1 commented Aug 9, 2018

That's great! I believe Parcel has of not actually writing to disk for this. @fathyb Can you confirm if that's true?

@Place1
Copy link

Place1 commented Aug 10, 2018

@mohsen1 I can’t understand what you’re asking 😬

@mohsen1
Copy link
Author

mohsen1 commented Aug 10, 2018

I mean those .d.ts files. Can we avoid writing those on disk

@Place1
Copy link

Place1 commented Aug 11, 2018

right. i chose to write them to the file system because that's what webpack typed css modules loader does.

importantly, it means the TS compiler and IDEs can find the declaration files. This is very useful because it means the language server can offer automatic import hints when typing css class names in ts files.

with that said, i haven't really thought about an alternative, do you have something in mind?

@mohsen1
Copy link
Author

mohsen1 commented Aug 11, 2018

I think I remember now. Parcel is not using a memory fs yet. Once Parcel supports memory fs we can "write" to that fs without actually messing up the actual fs. TS language server does support custom fs. that's how it works in browser.

I guess if you avoid writing to actual disk then you need to run a custom language server for your IDE as well. Maybe it doesn't worth it.

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

No branches or pull requests

3 participants