cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rexkenley
Kudo Commander
Kudo Commander

How to add coreJS3 to pcf react to support browsers like IE11

I noticed that if you use es6 features like promises in pcf react, IE 11 will error. 

https://kangax.github.io/compat-table/es6/#ie11

 

How do you add "polyfills" like coreJS3 into a pcf react component? It would be ideal if we can use the babel-preset-env & babel-plugin-transform-runtime to do this.

 

Thanks! 

11 REPLIES 11

@ScottDurow It seems like there should be some way to hook in while putting that customization in the project file structure (and therefore source control), avoiding having to modify the files sitting in $/node_modules/*. I will make sure the CLI team gets the community feedback around this, but if it can be put into that Idea post, it would make that easier.

rexkenley
Kudo Commander
Kudo Commander

@ScottDurow @GregHurlmanMSFT 

 

Shouldn't this be a part of the standard package since this is how Babel 7 will support browsers? The old "polyfill" is a Babel 6 recommendation.

 

As of Babel 7.4.0, this package has been deprecated in favor of directly including core-js/stable (to polyfill ECMAScript features) and regenerator-runtime/runtime (needed to use transpiled generator functions):

https://babeljs.io/docs/en/babel-polyfill

 

Helpers + polyfilling from core-js

So if you need core-js support with transform-runtime, you would now pass the corejs option and use the @babel/runtime-corejs2 dependency instead of @babel/runtime.

https://babeljs.io/docs/en/v7-migration

https://github.com/babel/babel/pull/8266

 

Ps.

Thanks for info about submitting ideas.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Use-the-new-Babel-7-babel-plugin-transform-runti...

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (4,608)