We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c51e66a commit 7a6e36dCopy full SHA for 7a6e36d
index.js
@@ -44,6 +44,9 @@ function cssExtract (bundle, opts) {
44
// extract css from chunks
45
// obj -> str
46
function extract (chunk) {
47
+ // Do a performant check before building the ast
48
+ if (String(chunk.source).indexOf('insert-css') === -1) return ''
49
+
50
const css = []
51
const ast = falafel(chunk.source, { ecmaVersion: 6 }, walk)
52
chunk.source = ast.toString()
0 commit comments