fix: revert copy rule glob filter

This commit is contained in:
Igor Randjelovic
2022-07-15 19:32:56 +02:00
parent 851c43ff43
commit a96445f530

View File

@ -71,15 +71,17 @@ export function applyCopyRules(config: Config) {
config.plugin('CopyWebpackPlugin').use(CopyWebpackPlugin, [ config.plugin('CopyWebpackPlugin').use(CopyWebpackPlugin, [
{ {
patterns: Array.from(copyRules) patterns: Array.from(copyRules)
.filter((glob) => { // reverted: removes valid rules occasionally (ie fonts)
if (process.env.NODE_ENV === 'test') { // todo: re-visit in future...
return true; // .filter((glob) => {
} // if (process.env.NODE_ENV === 'test') {
// remove rules that do not match any paths // return true;
// prevents webpack watch mode from firing // }
// due to "removed" paths. // // remove rules that do not match any paths
return globbySync(glob).length > 0; // // prevents webpack watch mode from firing
}) // // due to "removed" paths.
// return globbySync(glob).length > 0;
// })
.map((glob) => ({ .map((glob) => ({
from: glob, from: glob,
context: entryDir, context: entryDir,