Skip to content

Commit

Permalink
Add migration guide to PostCSS 8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Sep 28, 2020
1 parent 32a22a9 commit e867c79
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/processor.es6
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ class Processor {
if (i.postcss === true) {
let plugin = i()
throw new Error(
'PostCSS plugin ' + plugin.postcssPlugin +
' requires PostCSS 8. Update PostCSS or downgrade this plugin.'
'PostCSS plugin ' + plugin.postcssPlugin + ' requires PostCSS 8.\n' +
'Migration guide for end-users:\n' +
'https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users'
)
}

Expand All @@ -136,8 +137,9 @@ class Processor {
}
} else if (typeof i === 'object' && i.postcssPlugin) {
throw new Error(
'PostCSS plugin ' + i.postcssPlugin +
' requires PostCSS 8. Update PostCSS or downgrade this plugin.'
'PostCSS plugin ' + i.postcssPlugin + ' requires PostCSS 8.\n' +
'Migration guide for end-users:\n' +
'https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users'
)
} else {
throw new Error(i + ' is not a PostCSS plugin')
Expand Down

0 comments on commit e867c79

Please sign in to comment.