I've been working on porting a Chrome extension to Firefox that includes Chartjs charts on a page. It runs perfectly on Chrome, but I've encountered an issue when trying to transition it to Firefox. The charts fail to load and an error message displays:
Error: Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com
Even though my manifest.json file has the content scripts listed in the correct order for loading, Chartjs seems unable to locate moment js when populating the charts.
"content_scripts": [
{
"matches": [
"<site this should be active on>"
],
"css": [
"main.css"
],
"js": [
"jquery.js",
"moment.js",
"chartjs.js",
"main.js"
]
}
]
I've searched extensively on Google for a solution but have had no luck. Any help would be greatly appreciated!