diff --git a/src/index.js b/src/index.js index 87ecaac..4a77f4b 100644 --- a/src/index.js +++ b/src/index.js @@ -38,11 +38,15 @@ module.exports = options => ({ ) return extractedCSS } catch (e) { + const name = e.name // incorrect interpolations will throw CssSyntaxError and they'll be handled by stylelint if (e.name === 'CssSyntaxError') { errorWasThrown[absolutePath] = true throw e } + if (name === 'SyntaxError') { + return input + } return '' } },