I have an Angular application using Chart.js 3+ and it needs to run in Firefox 68.
Chart.js 3+ uses ResizeObserver in its code, which is not supported by that specific Firefox version.
So, when I try to load my chart in Firefox, I get the following error:
ReferenceError: "ResizeObserver is not defined"
In other browsers or newer versions of Firefox it works properly.
After some research, I read that I could install a polyfill for ResizeObserver and many suggested the following: https://github.com/juggle/resize-observer
So I installed it in my project by typing npm i @juggle/resize-observer and then added it to the polyfill.ts file:
import '@juggle/resize-observer';
import 'zone.js/dist/zone';
But the error persists. Am I missing something?
Thanks in advance.