Where should I download libraries for modules through composer? 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?
Install Composer Manager, then you won't need to think about it:


  Composer expects each project (Drupal installation, in our case) to have a single composer.json file listing all required packages. Composer Manager allows each contributed module to ship with its own composer.json file, listing the module-specific requirements. It then merges the requirements of all found modules into the consolidated composer.json file. This results in a single vendor/ directory shared across all modules which prevents code duplication and version mismatches.