Skip to content

Importing SDK into webpack 5 app requires extra library configuration #3842

@tomBarkerSwitchTelecom

Description

@tomBarkerSwitchTelecom

Describe the bug
When importing the SDK into a webpack 5 application there are underlying libraries that are no longer included as standard (for browser) which need require modifying the links to the libraries.

Is this expected?

libraries affected:

  • crypto
  • os
  • querystring
  • stream
  • vm

To Reproduce
Steps to reproduce the behavior:

  1. npx create-react-app webex-test --template typescript
  2. cd webex-test
  3. npm install --save webex
  4. Add <script crossorigin src="https://unpkg.com/webex/umd/webex.min.js"></script> to index.html
  5. Add const Webex = require("webex"); to App.tsx
  6. npm start

Expected behavior
SDK to import the underlying libraries it requires.

Workaround
Installing a browser version of the library and then "linking" it in the package.json seems to solve these issues.
see this example app https://github.com/tomBarkerSwitchTelecom/webex-test.

Screenshots
image

Platform (please complete the following information):

  • OS: [iOS]
  • Browser [chrome]
  • Version [3.4.0]
  • Device Type [Desktop]

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions