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 e483bccCopy full SHA for e483bcc
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 so we can abort early if there's nothing to extract
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