Hi, I was using your version of gantt 4.2.2 and gantt-react 4.2.2 and I had no problem with importing the two modules at the same time. Going to version 5.0.1, but also from some previous version, I get this error:
Uncaught Error: Bryntum bundle included twice, check cache-busters and file types (.js).
Simultaneous imports from ".module.js" and ".umd.js" bundles are not allowed.
I need to import LocaleManager to handle the language change in the gantt.
import React, { forwardRef, useEffect } from 'react'
import { BryntumGantt } from '@bryntum/gantt-react'
import { LocaleManager } from '@bryntum/gantt/gantt.umd'
import { getTaskTooltipFeature } from './helpers'
import Ru from '@bryntum/gantt/locales/gantt.locale.Ru'
import En from '@bryntum/gantt/locales/gantt.locale.En'
import It from './locales/gantt.locale.IT'
import zipcelx from 'zipcelx'
import './index.scss'
const locales = {
'it-IT': It,
'ru-RU': Ru,
'en-GB': En
}
const DEFAULT_LOCALE = 'it-IT'
const Gantt = forwardRef(
(
{
taskTooltipRenderer,
onTaskBarClick,
data,
syncDataOnLoad,
locale,
onCellClick,
taskStore,
...props
},
ref
) => {
useEffect(() => {
LocaleManager.locale = locales[locale || DEFAULT_LOCALE]
}, [locale])
return (
<div className='gantt-wrapper-container'>
<BryntumGantt
ref={ref}
{...props}
pdfExportFeature
taskTooltipFeature={getTaskTooltipFeature(taskTooltipRenderer)}
onTaskClick={onTaskBarClick}
excelExporterFeature={{ zipcelx }}
onCellClick={onCellClick}
/>
</div>
)
}
)
export default Gantt
Is there a solution to this bug?What I have found so far has not helped me.
Thanks