Skip to content

Commit 4dc86ed

Browse files
committed
minor #14948 updating config for postcss-loader v4 (weaverryan)
This PR was merged into the 5.2 branch. Discussion ---------- updating config for postcss-loader v4 Encore 1.0 now supports postcss-loader v4, and the options have changed. This fixes #14935 and symfony/webpack-encore#924 Thanks! Commits ------- c8ad122 updating config for postcss-loader v4
2 parents 0572f09 + c8ad122 commit 4dc86ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

frontend/encore/postcss.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ You can also pass options to the `postcss-loader`_ by passing a callback:
4343
.. code-block:: diff
4444
4545
// webpack.config.js
46+
+ const path = require('path');
4647
4748
Encore
4849
// ...
4950
+ .enablePostCssLoader((options) => {
50-
+ options.config = {
51+
+ options.postcssOptions = {
5152
+ // the directory where the postcss.config.js file is stored
52-
+ path: 'path/to/config'
53+
+ config: path.resolve(__dirname, 'sub-dir', 'custom.config.js'),
5354
+ };
5455
+ })
5556
;

0 commit comments

Comments
 (0)