Importing NPM Module JavaScript into web page issue

Hello everyone, I am working on an extension and have hit a road block. I am trying to import a JavaScript module from the npm package FusionCharts into a webpage. I am running into an issue where the script won't execute due to a MIME type being wrong. The script is imported simple like:
import FusionCharts from "fusioncharts"
import FusionCharts from "fusioncharts"
As you can see from the screenshot, the script is being injected into the webpage, but it is refusing to execute. Any idea on how I can fix this? Is there a better way to inject scripts? I much prefer this method if possible due to being able easily update the script in the future. Full source code can be seen on the Flights tree here: https://github.com/BWBama85/airline-club-plus/tree/flights
GitHub
GitHub - BWBama85/airline-club-plus at flights
Contribute to BWBama85/airline-club-plus development by creating an account on GitHub.
1 Reply
bwbama85
bwbama85OP•2y ago
For the time being I am just going to use the FusionCharts that is already on the page, but would be interested in why the import isn't pulling in all the files that I need or how I could also pull in the .charts file since it is just 404ing and the other error seems to be misguided, reading the 404 page.
Want results from more Discord servers?
Add your server