Skip to content

Commit 94c6b0a

Browse files
committed
Fix issue where . files did not allow a file to be omitted
1 parent b9ed41f commit 94c6b0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ OmitJSforCSSPlugin.prototype.findOmissibleFiles = function(compilation) {
5959
return;
6060
}
6161
module.fileDependencies.forEach(filepath => {
62-
if (!resourceOrigin[filepath] && !/(\bnode_modules\b)/.test(filepath)) {
62+
if (!resourceOrigin[filepath] && !/(\bnode_modules\b)/.test(filepath) && /\.(css|js)/g.test(filepath)) {
6363
/\.(css)$/i.test(filepath) ? assetTypeCount.css++ : assetTypeCount.internal++;
6464
}
6565
});

0 commit comments

Comments
 (0)