Skip to content

Commit bc6d5f6

Browse files
fix: Un-breaks getLoadersByName helper (#1568)
* fix: Un-breaks getLoadersByName helper * docs: Adding changeset Co-authored-by: Leah <github.leah@hrmny.sh>
1 parent d40e934 commit bc6d5f6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/mean-birds-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'preact-cli': patch
3+
---
4+
5+
Fixes breaking change to the getLoadersByName config helper

packages/cli/lib/lib/webpack/transform-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ class WebpackConfigHelpers {
235235
)
236236
.reduce((arr, loaders) => arr.concat(loaders), [])
237237
.filter(
238-
({ loader }) => loader === name || (loader && loader.loader === name)
238+
({ loader }) =>
239+
(typeof loader === 'string' && loader.includes(name)) ||
240+
(typeof loader.loader === 'string' && loader.loader.includes(name))
239241
);
240242
}
241243

0 commit comments

Comments
 (0)