Open the-owl opened 5 years ago
https://github.com/Lighthouse-io/react-visjs-timeline/blob/master/src/index.js#L1 This import includes a built vis.js bundle, with its own moment.js included. This increases output size and, most importantly, causes issues with moment.js locale configuration (because vis.js dist bundle uses its own copy of moment).
react-visjs-timeline: 1.5.0 vis version: 4.21.0
This is easily fixed by changing import from vis/dist/vis-timeline-graph2d.min to vis/index-timeline-graph2d.js. Currently I'm using a workaround via a webpack alias:
vis/dist/vis-timeline-graph2d.min
vis/index-timeline-graph2d.js
{ resolve: { alias: { 'vis/dist/vis-timeline-graph2d.min': 'vis/index-timeline-graph2d.js' } } }
This solves my issue with moment.js locales.
Overview
https://github.com/Lighthouse-io/react-visjs-timeline/blob/master/src/index.js#L1 This import includes a built vis.js bundle, with its own moment.js included. This increases output size and, most importantly, causes issues with moment.js locale configuration (because vis.js dist bundle uses its own copy of moment).
Package versions
react-visjs-timeline: 1.5.0 vis version: 4.21.0
Suggested fix
This is easily fixed by changing import from
vis/dist/vis-timeline-graph2d.min
tovis/index-timeline-graph2d.js
. Currently I'm using a workaround via a webpack alias:This solves my issue with moment.js locales.