[Webpack 2] Polyfill Promises for Webpack 2

Source: Internet
Author: User

If you ' re going to use code splitting with Webpack 2, you'll need to make sure the browser have support for the ES6 Promise A Pi. This means is required to the support of an old browser, and you need to provide a polyfill. Polyfilling is relatively trivial to does with Webpack, but because Webpack itself depends on this particular polyfill, you There are to come up with another the doing so. In this lesson, we'll see how we can use the Polyfill.io service to automatically polyfill this API (and others) for us.

Just include the Polyfill into index.html:

<src= "Https://cdn.polyfill.io/v2/polyfill.min.js"></  Script>

Polyfill.io

[Webpack 2] Polyfill Promises for Webpack 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.