Skip to content

Commit 36fe212

Browse files
committed
Verify rule.use is an array
1 parent fc5ddf2 commit 36fe212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const sharedConfig = {
2727
...defaultConfig.module,
2828
rules: defaultConfig.module.rules.map(
2929
( rule ) => {
30-
const postCssLoader = rule.use.find(
30+
const postCssLoader = Array.isArray( rule.use ) && rule.use.find(
3131
( loader ) => loader.loader && loader.loader.includes( 'postcss-loader' ),
3232
);
3333

0 commit comments

Comments
 (0)