Skip to content

Better polyfilling for IE11 in NPM #2511

@compulim

Description

@compulim

Feature request

Currently, the polyfilling story isn't great on NPM via create-react-app.

One approach is to follow what create-react-app does. To make CRA works in IE11, you will need to import 'react-app-polyfill/ie11'; and it will bring all polyfills required to make the CRA app works in IE11.

We could do something similar with:

import 'botframework-webchat/ie11';
import { ReactWebChat } from 'botframework-webchat';

Or

import 'botframework-webchat-polyfill/ie11';
import { ReactWebChat } from 'botframework-webchat';

Also, it seems Set does not need to be polyfilled.

Update from 2021-12-14

We should use @babel/plugin-transform-runtime and configure @babel/preset-env with useBuiltIns: "usage" to inline polyfills (a.k.a. ponyfills).

  • Add breaking changes: fetch is no longer polyfilled when using <script> tag to load Web Chat

For NPM install, we should do some investigations, goals:

  • Import botframework-webchat will work on IE11 or older browsers without significant work on bundler configuration
    • Chrome 85 introduced String.prototype.replaceAll
  • Ponyfills should not be leaked

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogOut of scope for the current iteration but it will be evaluated in a future release.community-help-wantedThis is a good issue for a contributor to take on and submit a solutionfeature-requestAzure report label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions