Skip to content

Commit 4f287e9

Browse files
ForsakenHarmonychriseppstein
authored andcommitted
fix: Flatten entry array because it can be nested.
Closes #157, #153.
1 parent 16d67df commit 4f287e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/@css-blocks/webpack/src/Plugin.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TemplateTypes } from "@opticss/template-api";
2-
import { ObjectDictionary, objectValues } from "@opticss/util";
2+
import { ObjectDictionary, flatten, objectValues } from "@opticss/util";
33
import * as debugGenerator from "debug";
44
import { postcss } from "opticss";
55
import * as path from "path";
@@ -114,7 +114,7 @@ export class CssBlocksPlugin
114114
entries = webpackEntry;
115115
}
116116
else if (typeof webpackEntry === "object") {
117-
entries = objectValues(webpackEntry);
117+
entries = flatten(objectValues(webpackEntry));
118118
}
119119

120120
let pending: PendingResult = this.analyzer.analyze(...entries)
@@ -322,3 +322,4 @@ export class CssBlocksPlugin
322322
this.applyPluginsAsync("block-compilation-complete", result, cb);
323323
}
324324
}
325+

0 commit comments

Comments
 (0)