Skip to content

Making it less annoying to bundle signal in the browser #2

Open
@elsehow

Description

@elsehow

If I npm install signal-protcol for my app, and require it in my browser bundle, I get

Users/ffff/empty-browser-module/node_modules/node-webcrypto-ossl/build/Release/nodessl.node:1
����
   ����__TEXT __text__TEXT�
                           �g�
                              �__stubs__TEXT�s>��__stub_helper__TEXT�w��w�__const__TEXT�~/�~__gcc_except_tab__TEXT��I�__cstring__TEXT����__unwind_info__TEXT���	��__eh_frame__TEXTH��EH�(__DATA    __got__DATA  �__nl_symbol_ptr__DATA!!�__la_symbol_ptr__DATA !� !�__mod_init_func__DATA��&	__const__DATA�&�&__data__DATA@/`@/H__LINKEDIT@�@��"�0@xx@ �B��EH��&��
^
ParseError: Unexpected character '�'

As it says in the README, I would now need to configure my bundler to exclude/ignore ./node_modules/signal-protocol/src/node_polyfills.js.

This is really not the friendliest solution. How can we work around this? How have other modules worked around this issue?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions