I've started to use Drupal 8 and some modules requires some libraries. For example search api solr. When I'm installing these libraries via composer it downloads the libraries into directory of the module. For example modules/contrib/search_api_solr/vendor. I don't think that it's correct because contrib modules should be stored in clean state.
What the right way to install libraries for modules via composer? Where should I store them?