We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ebb6e5 commit 793f319Copy full SHA for 793f319
lib/compiler/assets-manager.ts
@@ -103,9 +103,18 @@ export class AssetsManager {
103
104
this.watchers.push(watcher);
105
} else {
106
- const files = sync(item.glob, { ignore: item.exclude }).filter(
107
- (matched) => statSync(matched).isFile(),
108
- );
+ const matchedPaths = sync(item.glob, { ignore: item.exclude });
+ const files = item.glob.endsWith('*')
+ ? matchedPaths.filter((matched) => statSync(matched).isFile())
109
+ : matchedPaths.flatMap((matched) => {
110
+ if (statSync(matched).isDirectory()) {
111
+ return sync(`${matched}/**/*`, {
112
+ ignore: item.exclude,
113
+ }).filter((file) => statSync(file).isFile());
114
+ }
115
+ return matched;
116
+ });
117
+
118
for (const path of files) {
119
this.actionOnFile({ ...option, path, action: 'change' });
120
}
0 commit comments