Closed zsteinerjc closed 4 years ago
No, it is impossible on postcss-modules-values side, because interpolation values going on css-loader side or postcss-modules-plugin
Thank you for the response. When you say it's possible, do you mean that it's possible to add the feature in the future or it's possible to configure an existing project with errors/warnings?
I think the best solution here is write a stylelint rule
Also new css-loader
supported namedExport
(it will be true
by default in the near future) so you will get error on build step, so I want to close this issue
Is it possible to add an optional error or warning when a value is not found? For a large project it is difficult to confidently remove unused values without some feedback that a file is trying to import a value that is not found. Current imports fail silently with just the string of the value name getting passed along. For instance, if
@value myColor: rebeccaPurple
doesn't exist, thencolor: myColor
is output. Sass for instance will throw an error when using a variable that doesn't exist. Looking for an option to replicate this behavior.