GoogleChromeLabs / postcss-jit-props

A CSS custom property helper based on PostCSS. Supply a pool of variables and this plugin will add them to the stylesheet as they are used.
https://stackblitz.com/edit/jit-open-props?file=postcss.config.js
Apache License 2.0
219 stars 9 forks source link

Allow passing a file to the plugin, as the destination for injected props #25

Open argyleink opened 1 year ago

argyleink commented 1 year ago

see https://github.com/argyleink/open-props/issues/315

soluml commented 1 year ago

Would love to see this! Would be incredibly useful with CSS Modules.

Seems like if this option was passed you could defer writing to each file and once all files were done you could write to the provided file path if it exists (or error).