Skip to content

Commit 118ef01

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

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/schematics/angular/web-worker

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ 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, and aren't spec or module files.
143+
.filter(f => f.startsWith(options.name) && f.endsWith('.ts')
144+
&& !f.endsWith('spec.ts') && !f.endsWith('-.module.ts'))
144145
// Sort alphabetically for consistency.
145146
.sort();
146147

0 commit comments

Comments
 (0)