Hello,
I am trying to code a custom visualization on Kibana 6.6.1, however, the plugin registration breaks the interface.
The code is extremely simple since for the moment I only generated the plugin with the plugin generator and tried to register the new visualization.
index.js
import exampleRoute from './server/routes/example';
export default function (kibana) {
  return new kibana.Plugin({
    require: ['elasticsearch'],
    name: 'custom_export',
    uiExports: {
       visTypes: ['plugins/custom_export/vis']
    },
    config(Joi) {
      return Joi.object({
        enabled: Joi.boolean().default(true),
      }).default();
    },
    init(server, options) { // eslint-disable-line no-unused-vars
      // Add server routes and initialize the plugin here
      exampleRoute(server);
    }
  });
}
public/vis.js
import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
const CustomExportVis = (Private) => {
  const VisFactory = Private(VisFactoryProvider);
  return  VisFactory.createBaseVisualization({
    name: 'custom_export',
    title: 'Custom export',
    icon: 'fa_tachometer',
    description: 'Custom export button for Kibana',
  });
}
VisTypesRegistryProvider.register(CustomExportVis);
For information removing the line "VisTypesRegistryProvider.register(CustomExportVis);" makes the interface work but not the plugin (obviously). I see no errors in the log output.
Why is the interface reacting this way?
