Skip to content

new Worker() doesn't work from a library #29228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
mr-dev-dragon opened this issue Dec 25, 2024 · 2 comments
Closed
1 task done

new Worker() doesn't work from a library #29228

mr-dev-dragon opened this issue Dec 25, 2024 · 2 comments

Comments

@mr-dev-dragon
Copy link

Command

generate

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

Angular CLI: 19.0.6 | Angular Core: 19.0.5 | Node.js: 20.13.1

Description

The issue describes a problem when attempting to use the new Worker() constructor within an Angular library. The expected behavior is that the Web Worker should function correctly when instantiated from a library. However, it appears that this is not the case, indicating a potential bug in the Angular CLI's handling of Web Workers within libraries.

Minimal Reproduction

empty Brean new project

action =>
ng g component profile --standalone :

          CREATE src/app/profile/profile.component.html (23 bytes)
          CREATE src/app/profile/profile.component.spec.ts (622 bytes)
          CREATE src/app/profile/profile.component.ts (230 bytes)     
          CREATE src/app/profile/profile.component.scss (0 bytes)   

result = >

           import { Component } from '@angular/core';
            
            @Component({
              selector: 'app-profile',
              imports: [],
              templateUrl: './profile.component.html',
              styleUrl: './profile.component.scss'
            })
            export class ProfileComponent {
            
            }

I event added schematics to anguler.json =>

           "schematics": {
                "@schematics/angular:component": {
                  "style": "scss",
                  "standalone": true
                }
              },             

Exception or Error

no notifaction

Your Environment

ng version =>

                    Angular CLI: 19.0.6
                    Node: 20.13.1
                    Package Manager: npm 10.9.1
                    OS: win32 x64
                    
                    Angular: 19.0.5
                    Package                         Version
                    ---------------------------------------------------------  
                    @angular-devkit/architect       0.1900.6
                    @angular-devkit/build-angular   19.0.6
                    @angular-devkit/core            19.0.6
                    @angular-devkit/schematics      19.0.6
                    @angular/cli                    19.0.6
                    @schematics/angular             19.0.6
                    rxjs                            7.8.1
                    typescript                      5.6.3
                    zone.js                         0.15.0

Anything else relevant?

no

@JoostK
Copy link
Member

JoostK commented Dec 25, 2024

Duplicate of #29225

@JoostK JoostK marked this as a duplicate of #29225 Dec 25, 2024
@JoostK JoostK closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants