Skip to content

WebPack is broken due to the wsEngine option #522

@markbjerke

Description

@markbjerke

We can mitigate the WebPack issue by testing for the option being defined in a if/else branch, that way if the option is not defined there can be a require with a static path. As known there can be no variables in the require statement in order for WebPack to static resolve the asset.

This would allow those who are happy with the default ( most people ? ) to bundle the code for node targets with WebPack. It would still break bundling for users who did exercise the option for a different Websocket package, but I'm just guessing that the number is small and even smaller who want to bundle.

It's a trivial change to sniff the option in a branch first.

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