Skip to content

Commit 7d687fe

Browse files
fix(@schematics/angular): add snippet to component
Fixes 14467
1 parent 4b3c663 commit 7d687fe

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ function addSnippet(options: WebWorkerOptions): Rule {
140140

141141
const siblingModules = host.getDir(options.path).subfiles
142142
// 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'))
143+
.filter(f => f.startsWith(options.name)
144+
&& f.endsWith('component.ts') && !f.endsWith('spec.ts'))
144145
// Sort alphabetically for consistency.
145146
.sort();
146147

0 commit comments

Comments
 (0)