Skip to content

global not set in browser from webpack for 2.x-beta #489

@philcockfield

Description

@philcockfield

Example repo showing a reference to MobX which assumes global is window in the browser.
https://github.com/philcockfield/nextjs-mobx

To start run:

npm run dev

Error is thrown when MobX attempts to initialize itself by looking at global:

image

The failing line of code: https://github.com/mobxjs/mobx/blob/6e3df706de1f1fc2408ba919559297cd0d07573e/src/core/globalstate.ts#L91

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