Skip to content

Commit 5d827f8

Browse files
authored
Switch to regex in case the casing was wrong
1 parent 81ab6c8 commit 5d827f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ async function prerender (parentCompilation, request, options, inject, loader) {
101101
};
102102

103103
// Only copy over allowed plugins (excluding them breaks extraction entirely).
104-
const allowedPlugins = ['MiniCssExtractPlugin', 'ExtractTextPlugin'];
105-
const plugins = (parentCompiler.options.plugins || []).filter(c => allowedPlugins.includes(c.constructor.name));
104+
const allowedPlugins = /(MiniCssExtractPlugin|ExtractTextPlugin)/i;
105+
const plugins = (parentCompiler.options.plugins || []).filter(c => allowedPlugins.test(c.constructor.name));
106106

107107
// Compile to an in-memory filesystem since we just want the resulting bundled code as a string
108108
const compiler = parentCompilation.createChildCompiler('prerender', outputOptions, plugins);

0 commit comments

Comments
 (0)