Accepted answer

i think the cause of the issue is this config:

optimizedeps: {
  exclude: ['highcharts'], // ❌ don't do this

the solution would be to remove highcharts from optimizedeps.exclude.

also, you don't need a babel config when using vite. that might be another source of the problem.



here's a working example of vue3 + highcharts-vue:

be sure to update to the latest versions, and to use babel or any other transpilers to work with esm packages.

Related Query

More Query from same tag