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
+31
Original file line number
Diff line number
Diff line change
@@ -593,6 +593,37 @@ module.exports = {
593
593
};
594
594
```
595
595
596
+
### `implementation`
597
+
598
+
Type: `Function`
599
+
600
+
The special `implementation` option determines which implementation of PostCSS to use. Overrides the locally installed `peerDependency` version of `postcss`.
601
+
602
+
**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
+4
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,10 @@
35
35
"sourceMap": {
36
36
"description": "Enables/Disables generation of source maps (https://github.com/postcss/postcss-loader#sourcemap)",
37
37
"type": "boolean"
38
+
},
39
+
"implementation": {
40
+
"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
+30
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,36 @@ exports[`validate options should throw an error on the "execute" option with "te
36
36
-> Enables/Disables PostCSS parser support in 'CSS-in-JS' (https://github.com/postcss/postcss-loader#execute)"
37
37
`;
38
38
39
+
exports[`validate options should throw an error on the "implementation" option with "/test/" value 1`] =`
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)"
43
+
`;
44
+
45
+
exports[`validate options should throw an error on the "implementation" option with "[]" value 1`] =`
46
+
"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)"
49
+
`;
50
+
51
+
exports[`validate options should throw an error on the "implementation" option with "{}" value 1`] =`
52
+
"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)"
55
+
`;
56
+
57
+
exports[`validate options should throw an error on the "implementation" option with "1" value 1`] =`
58
+
"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)"
67
+
`;
68
+
39
69
exports[`validate options should throw an error on the "postcssOptions" option with "{"config":[]}" value 1`] =`
40
70
"Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
0 commit comments