Skip to content

Commit

Permalink
fix(processor): better error when importing missing @value
Browse files Browse the repository at this point in the history
  • Loading branch information
tivac committed Feb 28, 2020
1 parent 35e7a96 commit 0d06afa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/processor/plugins/values-composed.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module.exports = (css, { opts, messages }) => {
const source = files[resolve(from, parsed.source)];

parsed.refs.forEach(({ name }) => {
if(!source.values[name]) {
throw rule.error(`Could not find @value ${name} in "${parsed.source}"`);
}

values[name] = source.values[name];
});

Expand Down

0 comments on commit 0d06afa

Please sign in to comment.