Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.4.0
Describe the issue:
I have a custom plugin, and routes to view those pages in the plugin. I see a lot of scripts getting loaded which are not at all required for that route.
Is there a way to tell the server about the route and avoid those scripts that are not needed. like a dynamic import of scripts? Or how can i say, for my plugin rest of the plugins are not needed? in the manifest file, “opensearch_dashboards.json” file, setting the optionalPlugins and requiredPlugins doesn’t help.
Avoiding these unnecessary scripts will help avoid lot of network bandwidth during initial load and switching between routes.
Any help or guidance is appreciated. Thanks
Configuration:
Relevant Logs or Screenshots: