Skip to content

NPM package doesn't work for web workers #784

@pbadenski

Description

@pbadenski

Current behaviour

When trying to use "raven-js" as npm package from inside web worker (using https://github.com/webpack/worker-loader) it fails with "Uncaught ReferenceError: window is not defined". That's because "singleton.js" exported as "main" attempts to "cache" Raven instance using "window" object which doesn't exist within webworker execution.

Expected behaviour

It is possible to use "raven-js" from web worker using "npm" package.

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