webex-js-sdk-bundling-examples
Overview
Demonstrates 'webpack' bundling of the Webex JavaScript SDK and Momentum-UI style assets for use in browser application integrations.
Bundling frameworks demonstrated:
This project was built/tested using:
https://developer.webex.com/docs/sdks/browser
Getting started
-
From a terminal, clone this repo using git
:
git clone https://github.com/CiscoDevNet/webex-js-sdk-bundling-examples.git
-
Install dependencies:
cd webex-js-sdk-bundling-examples
npm install
-
Use OpenSSL] to create a self-signed key/certificate pair for serving pages with HTTPS:
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
-
Build and serve the sample web page using one of the available bundlers:
-
Open a web browser and navigate to https://localhost:3000
-
You can test the sample by logging into developer.webex.com and grabbing a Personal Access Token from the Getting Started page, then dialing another Webex Teams user via their Webex Id/email
Don't connect and dial based on the same user - that won't work!
Hints
- There is a workaround in webpack/webpack.config.js for an issue Webpack has with the
fs
module that's a dependency of webex
, but not actually needed in browser usage:
...
resolve: {
fallback: {
"fs": false
}
}
...
-
As of @webex 2.54.0, browserify > v16.5.1 bundling fails, see: cisco/node-jose#301
-
See package.json
for the browserlists
array of target browsers/versions