Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix browser echo sample for IE11 #1657

Merged
merged 4 commits into from Jul 19, 2019
Merged

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Jul 17, 2019

Semi-fix #1618.

Proposed Changes

  • Update all dependencies to latest version
    • Bump to botbuilder-core@4.5.0 and botframework-webchat@4.5.0
    • Removing unnecessary dependencies and plugins
  • Configure Babel to target "minus 2 versions" and Internet Explorer 11
  • Configure Webpack to transpile botbuilder-core because the package is targeting ESNext instead of ES5
  • Use core-js and regenerator-runtime instead of deprecated @babel/polyfill

In order to fix this sample in IE11, we requires 3 more fixes from botbuilder-js project:

Hacking botbuilder-js to make the sample work until we bump

turnContext.js/removeMentionText

- var mentionNameMatch = mentions[i].text.match(/(?<=<at.*>)(.*?)(?=<\/at>)/i);
+ var mentionNameMatch = [];

internal.js

- if (Proxy && Proxy.revocable) {
+ if (typeof Proxy !== 'undefined' && Proxy.revocable) {

Testing

  1. Test using Webpack development server
    1. npm start
    2. Browse to http://localhost:8080/ under IE11 and modern browsers
  2. Test using Webpack production build
    1. npm run build
    2. npx serve dist
    3. Browse to http://localhost:5000/ under IE11 and modern browsers

Copy link
Member

@stevengum stevengum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one piece of feedback regarding the dependency

"botframework-directlinejs": "~0.11.2",
"botframework-webchat": "4.2.0",
"core-js": "^3.0.1"
"botbuilder-core": "^4.5.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use ~ instead of ^? We test the versions by minor, so 4.2 might not necessarily work with 4.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

javascript_es6/01.browser-echo sample throws an error in Edge
3 participants