Skip to content

Commit 5f99db2

Browse files
fix(@schematics/angular): webworker snippet should not generate to module
Fixes #14467
1 parent 4b3c663 commit 5f99db2

File tree

1 file changed

+4
-2
lines changed
  • packages/schematics/angular/web-worker

1 file changed

+4
-2
lines changed

packages/schematics/angular/web-worker/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ function addSnippet(options: WebWorkerOptions): Rule {
139139
}
140140

141141
const siblingModules = host.getDir(options.path).subfiles
142-
// Find all files that start with the same name, are ts files, and aren't spec files.
143-
.filter(f => f.startsWith(options.name) && f.endsWith('.ts') && !f.endsWith('spec.ts'))
142+
// Find all files that start with the same name, are ts files,
143+
// and aren't spec or module files.
144+
.filter(f => f.startsWith(options.name) && f.endsWith('.ts')
145+
&& !f.endsWith('spec.ts') && !f.endsWith('-.module.ts'))
144146
// Sort alphabetically for consistency.
145147
.sort();
146148

0 commit comments

Comments
 (0)