We are using the highcharts npm module v9.3.3
We import highcharts from the es-module masters location in the node_modules directory:
import Highcharts from 'highcharts/es-modules/masters/highcharts.src.js';
I've tried doing similar with the annotations module (either the advanced or regular):
import Annotation from 'highcharts/es-modules/masters/modules/annotations-advanced.src.js'
and with just that added we get a runtime error when trying to add the annotations (Charts.addAnnotation is not a function).
We've also tried adding
Annotation(Highcharts)
which would in theory add the addAnnotation and removeAnnotation code to the charts object.
However with that we get a runtime error:
What is the appropriate way to import the annotations module as an es module?Uncaught SyntaxError: The requested module './../../../../node_modules/highcharts/es-modules/masters/modules/annotations-advanced.src.js' does not provide an export named 'default'