Skip to content

Commit e867c79

Browse files
committed
Add migration guide to PostCSS 8 error
1 parent 32a22a9 commit e867c79

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/processor.es6

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ class Processor {
115115
if (i.postcss === true) {
116116
let plugin = i()
117117
throw new Error(
118-
'PostCSS plugin ' + plugin.postcssPlugin +
119-
' requires PostCSS 8. Update PostCSS or downgrade this plugin.'
118+
'PostCSS plugin ' + plugin.postcssPlugin + ' requires PostCSS 8.\n' +
119+
'Migration guide for end-users:\n' +
120+
'https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users'
120121
)
121122
}
122123

@@ -136,8 +137,9 @@ class Processor {
136137
}
137138
} else if (typeof i === 'object' && i.postcssPlugin) {
138139
throw new Error(
139-
'PostCSS plugin ' + i.postcssPlugin +
140-
' requires PostCSS 8. Update PostCSS or downgrade this plugin.'
140+
'PostCSS plugin ' + i.postcssPlugin + ' requires PostCSS 8.\n' +
141+
'Migration guide for end-users:\n' +
142+
'https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users'
141143
)
142144
} else {
143145
throw new Error(i + ' is not a PostCSS plugin')

0 commit comments

Comments
 (0)