Skip to content

Commit

Permalink
Remove module overriding for explicitly adding postcss loader
Browse files Browse the repository at this point in the history
  • Loading branch information
thelovekesh committed Sep 30, 2022
1 parent a373ac8 commit 0c962d4
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ const sharedConfig = {
filename: '[name].js',
chunkFilename: '[name].js',
},
// TODO: Remove the `module` override once @wordpress/scripts upgrades to PostCSS 8.
module: {
...defaultConfig.module,
rules: defaultConfig.module.rules.map(
( rule ) => {
const postCssLoader = Array.isArray( rule.use ) && rule.use.find(
( loader ) => loader.loader && loader.loader.includes( 'postcss-loader' ),
);

if ( postCssLoader ) {
postCssLoader.loader = 'postcss-loader';
}

return rule;
},
),
},
plugins: [
...defaultConfig.plugins
.map(
Expand Down

0 comments on commit 0c962d4

Please sign in to comment.