Skip to content

Commit 14f1dba

Browse files
Tim Roeselasticmachine
andauthored
Make the actual Vislib import async (#78949) (#79079)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent f0be469 commit 14f1dba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plugins/vis_type_vislib/public/vis_controller.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import $ from 'jquery';
2121
import React, { RefObject } from 'react';
2222

23-
// @ts-ignore
24-
import { Vis as Vislib } from './vislib/vis';
2523
import { Positions } from './utils/collections';
2624
import { VisTypeVislibDependencies } from './plugin';
2725
import { mountReactNode } from '../../../core/public/utils';
@@ -80,6 +78,9 @@ export const createVislibVisController = (deps: VisTypeVislibDependencies) => {
8078
return resolve();
8179
}
8280

81+
// @ts-expect-error
82+
const { Vis: Vislib } = await import('./vislib/vis');
83+
8384
this.vislibVis = new Vislib(this.chartEl, visParams, deps);
8485
this.vislibVis.on('brush', this.vis.API.events.brush);
8586
this.vislibVis.on('click', this.vis.API.events.filter);

0 commit comments

Comments
 (0)