Skip to content

Commit 600b8a1

Browse files
committed
Revert "use oneOf per theme"
This reverts commit e53efb3.
1 parent e53efb3 commit 600b8a1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

packages/react-scripts/config/webpack.config.library.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ module.exports = {
144144
],
145145
include: paths.appSrc,
146146
},
147-
...cssThemeExtracts.map((themeExtractTextPlugin, index) => {
148-
return {
149-
oneOf: [
147+
...cssThemeExtracts.reduce(
148+
(accumulator, themeExtractTextPlugin, index) => {
149+
return accumulator.concat(
150150
// The notation here is somewhat confusing.
151151
// "postcss" loader applies autoprefixer to our CSS.
152152
// "css" loader resolves paths in CSS and adds assets as dependencies.
@@ -198,10 +198,11 @@ module.exports = {
198198
],
199199
}),
200200
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
201-
},
202-
],
203-
};
204-
}),
201+
}
202+
);
203+
},
204+
[]
205+
),
205206
{
206207
// "oneOf" will traverse all following loaders until one will
207208
// match the requirements. When no loader matches it will fall

0 commit comments

Comments
 (0)