You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1
Original file line number
Diff line number
Diff line change
@@ -597,12 +597,14 @@ module.exports = {
597
597
598
598
### `implementation`
599
599
600
-
Type: `Function`
600
+
Type: `Function | String`
601
601
602
602
The special `implementation` option determines which implementation of PostCSS to use. Overrides the locally installed `peerDependency` version of `postcss`.
603
603
604
604
**This option is only really useful for downstream tooling authors to ease the PostCSS 7-to-8 transition.**
Copy file name to clipboardExpand all lines: src/options.json
+8-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,14 @@
39
39
},
40
40
"implementation": {
41
41
"description": "The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)",
Copy file name to clipboardExpand all lines: test/__snapshots__/validate-options.test.js.snap
+24-14
Original file line number
Diff line number
Diff line change
@@ -38,32 +38,42 @@ exports[`validate options should throw an error on the "execute" option with "te
38
38
39
39
exports[`validate options should throw an error on the "implementation" option with "/test/" value 1`] =`
40
40
"Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
41
-
- options.implementation should be an instance of function.
42
-
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)"
41
+
- options.implementation should be one of these:
42
+
string | function
43
+
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)
44
+
Details:
45
+
* options.implementation should be a string.
46
+
* options.implementation should be an instance of function."
43
47
`;
44
48
45
49
exports[`validate options should throw an error on the "implementation" option with "[]" value 1`] =`
46
50
"Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
47
-
- options.implementation should be an instance of function.
48
-
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)"
51
+
- options.implementation should be one of these:
52
+
string | function
53
+
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)
54
+
Details:
55
+
* options.implementation should be a string.
56
+
* options.implementation should be an instance of function."
49
57
`;
50
58
51
59
exports[`validate options should throw an error on the "implementation" option with "{}" value 1`] =`
52
60
"Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
53
-
- options.implementation should be an instance of function.
54
-
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)"
61
+
- options.implementation should be one of these:
62
+
string | function
63
+
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)
64
+
Details:
65
+
* options.implementation should be a string.
66
+
* options.implementation should be an instance of function."
55
67
`;
56
68
57
69
exports[`validate options should throw an error on the "implementation" option with "1" value 1`] =`
58
70
"Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
59
-
- options.implementation should be an instance of function.
60
-
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)"
61
-
`;
62
-
63
-
exports[`validate options should throw an error on the "implementation" option with "something" value 1`] =`
64
-
"Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
65
-
- options.implementation should be an instance of function.
66
-
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)"
71
+
- options.implementation should be one of these:
72
+
string | function
73
+
-> The implementation of postcss to use, instead of the locally installed version (https://github.com/postcss/postcss-loader#implementation)
74
+
Details:
75
+
* options.implementation should be a string.
76
+
* options.implementation should be an instance of function."
67
77
`;
68
78
69
79
exports[`validate options should throw an error on the "postcssOptions" option with "{"config":[]}" value 1`] =`
0 commit comments