Skip to content

Commit

Permalink
Merge pull request #7273 from ampproject/update/webpack-config
Browse files Browse the repository at this point in the history
Remove postcss loader from webpack config
  • Loading branch information
westonruter authored Sep 30, 2022
2 parents a373ac8 + 0c962d4 commit 7048475
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 7048475

Please sign in to comment.