How to server.plugins.xpack_main.registerFeature on the new platform?


I have created a basic plugin using the plugin generator, and I have been reading documentation about different legacy functionality and the new platform equivalents. However, I cannot find an example of how to register a feature using xpack from this documentation (which is in the legacy format). I see that the current version of the documentation doesn't have this page anymore. Is there any documentation or guidance I can follow to register a feature so that I can use the ui capabilities (or whatever the equivalent is in the new platform)?


Hey there!

Our plugin documentation is being updated with the roll out of the new platform. In the mean time, checkout this migration doc in the kibana repo:

The registerFeature function has migrated to the features plugin. So, in the new plugin system, you'll have to add the features plugin as a dependency and then you can call plugin.features.registerFeature from your plugin's setup function. You can see how Canvas does it here:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.