2
0

compatibility.js 868 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // =======================================
  2. // Intl polyfill
  3. // =======================================
  4. // Requirement: Safari 9 and below
  5. if (!global.Intl) {
  6. require('intl')
  7. require('intl/locale-data/jsonp/en')
  8. require('intl/locale-data/jsonp/fr')
  9. }
  10. // =======================================
  11. // Promise polyfill
  12. // =======================================
  13. // Requirement: IE 11 and below
  14. if (!window.Promise) {
  15. window.Promise = require('bluebird')
  16. }
  17. // =======================================
  18. // Array.from polyfill
  19. // =======================================
  20. // Requirement: IE 11 and below
  21. if (!Array.from) {
  22. require('./polyfills/array-from')
  23. }
  24. // =======================================
  25. // Fetch polyfill
  26. // =======================================
  27. // Requirement: Safari 9 and below, IE 11 and below
  28. if (!window.fetch) {
  29. require('whatwg-fetch')
  30. }