Mykola Veryha Asked:2020-03-30 02:42:27 +0000 UTC2020-03-30 02:42:27 +0000 UTC 2020-03-30 02:42:27 +0000 UTC 使用 Composer 在单独的目录中安装库 772 Drupal 8 仅在某些目录中查找包含的库。我有一个图书馆 composer require components/chosen 安装在目录vendor/components/chosen drupal 1 个回答 Voted Best Answer Mykola Veryha 2020-03-30T02:42:27Z2020-03-30T02:42:27Z 在这里找到的答案作曲家忽略了安装程序路径配置 如您所知,您可以使用 自定义安装路径指定自定义目录 "extra": { "installer-paths": { "your/custom/path/{$name}/": ["type:drupal-library"] } } 但是在这个库中,类型等于组件,并且这种类型不支持额外的 "installer-paths" 。并且它不能安装在单独的目录中。 该软件包是解决方案。 composer require oomphinc/composer-installers-extender 安装后,您可以添加类型“组件”并通过库名称指定“安装程序路径”。 "extra": { "installer-types": ["component"], "installer-paths": { "web/libraries/{$name}": ["type:drupal-library", "components/chosen"], } }
在这里找到的答案作曲家忽略了安装程序路径配置
如您所知,您可以使用 自定义安装路径指定自定义目录
但是在这个库中,类型等于组件,并且这种类型不支持额外的 "installer-paths" 。并且它不能安装在单独的目录中。
该软件包是解决方案。
安装后,您可以添加类型“组件”并通过库名称指定“安装程序路径”。