# Adding dependency to custom plugin (New Platform)

**URL:** <https://discuss.elastic.co/t/adding-dependency-to-custom-plugin-new-platform/241744>\
**Category:** Kibana\
**Created:** [July 18, 2020, 12:39pm UTC](https://discuss.elastic.co/t/adding-dependency-to-custom-plugin-new-platform/241744 "2020-07-18T12:39:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [July 18, 2020, 12:39pm UTC](https://discuss.elastic.co/t/adding-dependency-to-custom-plugin-new-platform/241744/1 "2020-07-18T12:39:39Z")

</div>

I am using `node scripts/generate_plugin my_plugin_name # replace "my_plugin_name" with your desired plugin name` to create a custom plugin with Kibana 7.8.

How i can add a dependency, only to my plugin, like package.json with the legacy. ?  
Before new kibana platform, i use `yarn add` iside my plugin path to add my dependencies, and those are saved into `package.json` of the plugin

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 13, 2020, 9:43am UTC](https://discuss.elastic.co/t/adding-dependency-to-custom-plugin-new-platform/241744/2 "2020-08-13T09:43:03Z")

</div>

Hi, sorry for the late reply,  
Yes, you can install as many packages from npm as you like. They should be included in the 3rd party plugin's downloaded archive because Kibana doesn't install them when your plugin is installed (to support offline install)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 10, 2020, 9:43am UTC](https://discuss.elastic.co/t/adding-dependency-to-custom-plugin-new-platform/241744/3 "2020-09-10T09:43:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
