Split/Separate core yii2 packages from project packages

Hello!
I don’t know how to explain my question without an example.
What I want to accomplish is to have a folder with all the core yii2 packages to be shared between projects and other folders to keep packages related to some projects only.’
Structure Example:

/frameworks/yii2
         composer.json   <-- here all core yii2 packages
         /vendor              <-- here all files related to composer.json above

/projects
    /project1
        composer.json  <-- here I'd like only specific packages, like kartik-v/yii2-widget-datepicker
        /vendor             <-- here the files from composer.json above
   /project2
        composer.json  <-- same idea
        /vendor

project1 and project2 must include the vendor of the core yii2 at frameworks/yii2/vendor and their specific packages at their own vendor folder.

I tried but the “local” composer.json complain about the missing dependencies.

Thanks for All!

I use follow strukture:


/vendor/composer

/vendor/ea/app - application module (config and etc)
/vendor/irekini/mobapp - application module (config and etc)
/vendor/vlocas

/vendor/yiisoft
/web/index.php $config = require(DIR . ‘/…/vendor/ea/app/config/web.php’);
/web_mob/ index.php $config =require(DIR . ‘/…/vendor/irekini/mobapp/config/web.php’);

This solution allow share all PHP libraries between all applications