Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.

Commit 525514a

Browse files
committed
fixup! 83c133a
1 parent ec426d2 commit 525514a

File tree

2 files changed

+4
-44
lines changed

2 files changed

+4
-44
lines changed

lib/errors.js

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,14 @@ css-customs-loader should be added BEFORE css-loader.
44
`.trim()
55
)
66

7-
exports.usePostcssLoader = new Error(
7+
exports.missingPostcssLoader = new Error(
88
`
99
postcss-loader is missing, you need to use it in order for css-customs-loader to work properly.
1010
`
1111
)
1212

13-
exports.parseBeforeCssLoader = new Error(
13+
exports.missingPostcssPresetEnv = new Error(
1414
`
15-
css-customs-loader/parse should added AFTER css-loader. If the order of your loaders is intentional and it works, consider raising an issue to remove this error.
16-
https://github.com/silvenon/css-customs-loader/issues
17-
`.trim()
18-
)
19-
20-
exports.parseBeforePostcssLoader = new Error(
21-
`
22-
css-customs-loader/parse should be added AFTER postcss-loader. If the order of your loaders is intentional and it works, consider raising an issue to remove this error.
23-
https://github.com/silvenon/css-customs-loader/issues
24-
`.trim()
25-
)
26-
27-
exports.exportAfterCssLoader = new Error(
28-
`
29-
css-customs-loader/export should be added BEFORE css-loader. If the order of your loaders is intentional and it works, consider raising an issue to remove this error.
30-
https://github.com/silvenon/css-customs-loader/issues
31-
`.trim()
32-
)
33-
34-
exports.noIndexLoader = new Error(
35-
`
36-
Use css-customs-loader/parse and css-customs-loader/export.
37-
`.trim()
38-
)
39-
40-
exports.missingPostcssConfig = new Error(
41-
`
42-
You're using postcss-loader, but css-customs-loader/parse couldn't find a valid PostCSS configuration.
43-
`.trim()
44-
)
45-
46-
exports.missingParseLoader = new Error(
47-
`
48-
css-customs-loader/parse loader is missing.
49-
`.trim()
50-
)
51-
52-
exports.missingCustoms = new Error(
53-
`
54-
Customs are missing. Maybe you're using a loader between css-customs-loader/parse and css-customs-loader/export that modified metadata and lost them. Please raise an issue providing your webpack configuration.
55-
https://github.com/silvenon/css-customs-loader/issues
15+
postcss-preset-env is missing from your plugins, you need to use it in order for css-customs-loader to work properly.
5616
`
5717
)

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = async function(content, sourceMap, meta) {
2121
isLoader(loader, 'postcss-loader')
2222
)
2323
if (postcssLoaderIndex === -1) {
24-
return callback(error.usePostcssLoader)
24+
return callback(error.missingPostcssLoader)
2525
}
2626

2727
const additionalLoaders = this.loaders.slice(postcssLoaderIndex + 1)

0 commit comments

Comments
 (0)