From c2c4d4d7f49cd82affacaf6545b7d7c7a5b338bc Mon Sep 17 00:00:00 2001 From: Zack Jackson Date: Thu, 21 Jun 2018 23:02:58 -0400 Subject: [PATCH] fix(flushChunks): Fixed duplicate bootstrap When using one of the older webpack config setups. Bootstrap is duplicated and executed twice #61 --- src/flushChunks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flushChunks.js b/src/flushChunks.js index 7697caf..930bf3c 100644 --- a/src/flushChunks.js +++ b/src/flushChunks.js @@ -74,7 +74,7 @@ const flushChunks = (stats: Stats, isWebpack: boolean, opts: Options = {}) => { const jsAfter = ffc(afterEntries) return createApiWithCss( - [...jsBefore, ...files, ...jsAfter], + [...jsBefore, ...files, ...jsAfter].filter(isUnique), [ ...jsBefore, // likely nothing in here, but if so: bootstrap.css, vendor.css, etc ...jsAfter.reverse(), // main.css, someElseYouPutBeforeMain.css, etc