I have an existing project vue, in which case everything was running fine.
we decided to optimize the bundle size of the app because it was too large and implemented lazy loading routes,
e.g
const ContentAuditPage = () => import("./components/content-audit/ContentAuditPage");
after then I noticed that fusion chart was throwing an error,
the chart is in a sidebar and when the sidebar is opened and the data from the endpoint is ready to display to be displayed, this error is thrown
https://localhost:3000/v2/108967/content/audit/fusioncharts.charts.js net::ERR_ABORTED 404 (Not Found)
and this after
fusioncharts.js:13 Uncaught (in promise) Error: ChunkLoadError
at a.e (fusioncharts.js:13:2209)
at d (fusioncharts.js:13:57828)
at Function.<anonymous> (fusioncharts.js:13:59295)
at i (fusioncharts.js:13:177902)
at o (fusioncharts.js:13:178077)
at h (fusioncharts.js:13:179357)
at t.chartType (fusioncharts.js:13:84493)
at new e (fusioncharts.js:13:76516)
at new f (fusioncharts.js:13:61265)
at VueComponent.renderChart (index.js:17918:1)
at fusioncharts.js:13:72261
in my vue project it is imported like so
import FusionCharts from 'fusioncharts';
import Exports from 'fusioncharts/fusioncharts.excelexport';
import TimeSeries from 'fusioncharts/fusioncharts.timeseries';
const vueFusionCharts = VueFusionChartsComponent(FusionCharts, Exports, TimeSeries);
FusionCharts.options['license']({
key: process.env.FUSIONCHARTS_KEY,
creditLabel: false,
});```