v5 Migration Guide
This guide walks you through all breaking changes introduced in v5.0.0 to help you migrate from v4.x.
Module components
We moved all module-related components from /options to /modules:
// Beforeimport { Accessibility } from "@highcharts/react/options/accessibility";// Afterimport { Accessibility } from "@highcharts/react/modules/accessibility";
Pure ESM migration
We migrated to the pure ESM paths, replacing the webpack-bundled /esm imports with /es-modules/masters for better compatibility with modern bundlers. For example, the Boost module:
// Beforeimport "highcharts/esm/modules/marker-clusters.src.js";// Afterimport "highcharts/es-modules/masters/modules/marker-clusters.src.js";
Note: We recommend using module-related components wherever possible. Only import modules directly if Highcharts React does not yet provide a corresponding module component.
Vite users
In Vite v7 and below, esbuild's dependency pre-bundling breaks the expected module initialization order in development by bundling them into a single module. To avoid this, you can exclude highcharts from pre-bundling to load each module directly:
export default defineConfig({optimizeDeps: {exclude: ["highcharts"],},});
Note: This does not affect production builds.
Chart options type
We renamed the HighchartsOptionsType type for the Chart component options prop to ChartOptions:
// Beforeimport { type HighchartsOptionsType } from "@highcharts/react";// Afterimport { type ChartOptions } from "@highcharts/react";