Skip to content

Commit 9e5c9cf

Browse files
docs: fix the config option usage (#473)
1 parent 792e217 commit 9e5c9cf

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,9 @@ module.exports = {
502502
test: /\.css$/i,
503503
loader: 'postcss-loader',
504504
options: {
505-
config: false,
505+
postcssOptions: {
506+
config: false,
507+
},
506508
},
507509
},
508510
],
@@ -517,14 +519,18 @@ Allows to specify the path to the config file.
517519
**webpack.config.js**
518520

519521
```js
522+
const path = require('path');
523+
520524
module.exports = {
521525
module: {
522526
rules: [
523527
{
524528
test: /\.css$/i,
525529
loader: 'postcss-loader',
526530
options: {
527-
config: path.resolve(__dirname, 'custom.config.js'),
531+
postcssOptions: {
532+
config: path.resolve(__dirname, 'custom.config.js'),
533+
},
528534
},
529535
},
530536
],
@@ -948,6 +954,8 @@ module.exports = {
948954
**webpack.config.js**
949955

950956
```js
957+
const path = require('path');
958+
951959
module.exports = {
952960
module: {
953961
rules: [
@@ -959,7 +967,9 @@ module.exports = {
959967
{
960968
loader: 'postcss-loader',
961969
options: {
962-
config: 'path/to/postcss.config.js',
970+
postcssOptions: {
971+
config: path.resolve(__dirname, 'path/to/postcss.config.js'),
972+
},
963973
},
964974
},
965975
],

0 commit comments

Comments
 (0)