Skip to content

ember-browserify imports browser version under Fastboot #114

@gabrielgrant

Description

@gabrielgrant

Previously filed under fastboot as ember-fastboot/ember-cli-fastboot#370

browserify defines a browser field in package.json as the recommended method for library authors to account for the differences between a browser and node environment in universal JS packages. This allows, for example, using the same websocket API in client-side and browser-side code: https://github.com/gabrielgrant/javascript-universal-websocket-client

Unfortunately, under fastboot ember-browserify still tries to use the browser implementation despite running in Node.

When running under fastboot, it seems ember-browserify should compile using browserify's --no-browser-field flag: "Turn off package.json browser field resolution. This is also handy if you need to run a bundle in node."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions