How to create a custom field formatter plugin in 7.9.x?

Could somebody provide me an example how to create a plugin for custom field formatters?
I had one for 6.x but since the architecture of the plugins changed in 7.9.x I am looking for some help to register my plugin where I have couple of custom field formatters. My previous version was like below:

 return new kibana.Plugin({
    name: 'my-field-formatters',
    require: ['kibana'],
    uiExports: {
      hacks: ["plugins/my-field-formatters/hack"],
      fieldFormats: [ 'plugins/my-field-formatters/formatter1']

Any example for 7.9.x would be great. Thanks in advance.

@nrt.krishna Migrating legacy (pre-Kibana Platform) plugins can be tricky and we tried to cover the 'how-to' in the docs for integrating legacy (older) plugins to the Kibana Platform here. The extended guide goes into much more detail.

Thanks for the links. But I am looking for the tricky part how I can register my custom field formatters plugin.