You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to build a plugin that would extract images and web fonts from the generated CSS and copy them to the distribution directory.
The idea was to use sourceMapEmbed, then after this plugin generated the CSS, I would go get the map, list the original sources and search for url(...)s on the code, copy them and replace the path on the CSS.
The problem I found is that, because this plugin uses renderSync with the data option, the source map sources is stdin.
Playing around with the plugin code I saw that the only reason for using data is when you receive the prependSass option, and I was thinking that maybe you could use data only when prependSass has some value, and in case is empty, use file.
Hi,
I was trying to build a plugin that would extract images and web fonts from the generated CSS and copy them to the distribution directory.
The idea was to use
sourceMapEmbed
, then after this plugin generated the CSS, I would go get the map, list the original sources and search forurl(...)
s on the code, copy them and replace the path on the CSS.The problem I found is that, because this plugin uses
renderSync
with thedata
option, the source mapsources
isstdin
.Playing around with the plugin code I saw that the only reason for using
data
is when you receive theprependSass
option, and I was thinking that maybe you could usedata
only whenprependSass
has some value, and in case is empty, usefile
.The change would be something like this:
The rest would work the same.
Would you consider it if I send a PR?
Regards
The text was updated successfully, but these errors were encountered: