There is plenty of documentation on how to add a hack in kibana.plugin using UI exports.
How do you add them with the new plugin structure? I generated the plugin and using 7.7.2.
I assume it goes somewhere in here.
import { i18n } from '@kbn/i18n';
import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '../../../src/core/public';
import {
CustomCssServerPluginSetup,
CustomCssServerPluginStart,
AppPluginStartDependencies,
} from './types';
import { PLUGIN_NAME } from '../common';
export class CustomCssServerPlugin
implements Plugin<CustomCssServerPluginSetup, CustomCssServerPluginStart> {
public setup(core: CoreSetup): CustomCssServerPluginSetup {
core.application.register({
id: 'customCssServer',
title: PLUGIN_NAME,
async mount(params: AppMountParameters) {
const { renderApp } = await import('./application');
const [coreStart, depsStart] = await core.getStartServices();
return renderApp(coreStart, depsStart as AppPluginStartDependencies, params);
},
});
return {
getGreeting() {
return i18n.translate('customCssServer.greetingText', {
defaultMessage: 'Hello from {name}!',
values: {
name: PLUGIN_NAME,
},
});
},
};
}
public start(core: CoreStart): CustomCssServerPluginStart {
return {};
}
public stop() {}
}