parcel-plugin-typescript
parcel-plugin-typescript copied to clipboard
Integrate typed-css-modules
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 https://github.com/Quramy/typed-css-modules/issues/51
👍 it would be more than welcome, let me know if you need any help
I've implemented this over at https://github.com/place1/parcel-plugin-typed-css-modules
That's great! I believe Parcel has of not actually writing to disk for this. @fathyb Can you confirm if that's true?
@mohsen1 I can’t understand what you’re asking 😬
I mean those .d.ts
files. Can we avoid writing those on disk
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?
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.