Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Warning (workerize-loader): output.globalObject is set to "window". It should be set to "self" or "this" to support HMR in Workers #20

@filipesilva

Description

@filipesilva

Heya,

I'm trying to follow up your initial work in angular/angular-cli#12575.

I see Warning (workerize-loader): output.globalObject is set to "window". It should be set to "self" or "this" to support HMR in Workers when serving, but not when building.

That warning seems to come from here:

console.warn('Warning (workerize-loader): output.globalObject is set to "window". It should be set to "self" or "this" to support HMR in Workers.');

What's the intended way of addressing this warning? I'd like to keep the globalObject settings of the main compilation unaltered.

As a side-note, the name workerize-loader is misleading. It took me a while to figure out that it came from this package since I was looking for a workerize-loader in node modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions