Files are saved to the disk when using Parcel
buzinas opened this issue · 3 comments
First, thanks for creating astroturf, it has almost everything I'd like in a CSS-in-JS library!
I'm trying to use it with Parcel, but lots of files are being generated (saved to disk):
This is a bummer, since I don't want to have my source files polluted like that.
I tried to tweak .babelrc
to use writeFiles: false
, but then I get the following error:
For what is worth it, I'm using Parcel v2.
Is there an easy way to fix this behavior?
hi there, yes the files are written to disk when using parcel, or any other thing besides webpack. The reason boils down webpack is pluggable in a way that allows for keeping the files in memory and still processing them as if they were on disk. AFAIK that isn't possible in Parcel, or at least I don't know how to write a plugin that allows it and integrates nicely.
The other possible issue with Parcel is it uses very outdated tooling for processing css modules so some astroturf features aren't possible like selector interpolation. cc @devongovett Who can correct me if i'm super off-base!
Would it be possible to at least remove those files after the build is done? I don't mind creating those extra files temporarily, the problem is having to remove them after I'm done.
some sort of Parcel plugin might be able to. Babel plugin tho has no idea when the build is done or even that it's being used inside of parcel and so can't guess when it'd be safe to remove them. Super open to making this better, but since i'm not personally a user of Parcel i don't have a lot of expertise or time to build it!