From 2b53cad40390f1f446d37b74ee208899cfec4dbf Mon Sep 17 00:00:00 2001 From: Tim Hostetler <6970899+thostetler@users.noreply.github.com> Date: Thu, 6 May 2021 10:59:46 -0400 Subject: [PATCH] add polyfill for intersectionObserver --- grunt/concurrent.js | 1 + grunt/curl.js | 4 ++++ src/config/common.config.js | 1 + src/config/discovery.config.js | 1 + 4 files changed, 7 insertions(+) diff --git a/grunt/concurrent.js b/grunt/concurrent.js index 718691abe..1ce6253b9 100644 --- a/grunt/concurrent.js +++ b/grunt/concurrent.js @@ -22,6 +22,7 @@ module.exports = { 'curl:xstate-react', 'curl:array-flat-polyfill', 'curl:sinon', + 'curl:polyfill', ], hash_require: ['hash_require:js', 'hash_require:css'], }; diff --git a/grunt/curl.js b/grunt/curl.js index 5a68c1fcf..fc0d070e2 100644 --- a/grunt/curl.js +++ b/grunt/curl.js @@ -77,4 +77,8 @@ module.exports = { src: 'https://cdnjs.cloudflare.com/ajax/libs/sinon.js/1.9.0/sinon.min.js', dest: 'src/libs/sinon/index.js', }, + polyfill: { + src: 'https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver', + dest: 'src/libs/polyfill/index.js', + }, }; diff --git a/src/config/common.config.js b/src/config/common.config.js index 89e6af346..04c45befe 100644 --- a/src/config/common.config.js +++ b/src/config/common.config.js @@ -46,6 +46,7 @@ define([], function() { 'config/discovery.vars', 'regenerator-runtime', 'array-flat-polyfill', + 'polyfill', ], function(config) { // rca: not sure why the ganalytics is loaded here instead of inside analytics.js // perhaps it is because it is much/little sooner this way? diff --git a/src/config/discovery.config.js b/src/config/discovery.config.js index e14e8ef30..a9280bd62 100644 --- a/src/config/discovery.config.js +++ b/src/config/discovery.config.js @@ -322,6 +322,7 @@ require.config({ xstate: 'libs/xstate/index', '@xstate/react': 'libs/xstate-react/index', 'array-flat-polyfill': 'libs/polyfills/array-flat-polyfill', + polyfill: 'libs/polyfill/index', }, hbs: {