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 b9ed41f commit 94c6b0aCopy full SHA for 94c6b0a
src/index.js
@@ -59,7 +59,7 @@ OmitJSforCSSPlugin.prototype.findOmissibleFiles = function(compilation) {
59
return;
60
}
61
module.fileDependencies.forEach(filepath => {
62
- if (!resourceOrigin[filepath] && !/(\bnode_modules\b)/.test(filepath)) {
+ if (!resourceOrigin[filepath] && !/(\bnode_modules\b)/.test(filepath) && /\.(css|js)/g.test(filepath)) {
63
/\.(css)$/i.test(filepath) ? assetTypeCount.css++ : assetTypeCount.internal++;
64
65
});
0 commit comments