css-modules / postcss-modules-values

Pass arbitrary constants between your module files
ISC License
38 stars 6 forks source link

Prevent @value to create an :export #5

Open EECOLOR opened 4 years ago

EECOLOR commented 4 years ago

Would you be willing to add a configuration option that prevents an @value to generate an :export rule?

alexander-akait commented 3 years ago

Sorry for delay, why do you need this?

EECOLOR commented 3 years ago

We use @value and :export for different purposes. @value to create a variable for the current file to be used and :export to export things to be used by javascript.

We require our developers to use :export when they intent to expose the value. The :export statement clearly communicates it is used outside of css. The side effect of @value complicates this clarity because it exports as well.

alexander-akait commented 3 years ago

@EECOLOR feel free to send a PR with a new option for this