# Kibana 7.4.2 Plugin Development. Using external project with shared code

**URL:** <https://discuss.elastic.co/t/kibana-7-4-2-plugin-development-using-external-project-with-shared-code/225141>\
**Category:** Kibana\
**Created:** [March 26, 2020, 8:19am UTC](https://discuss.elastic.co/t/kibana-7-4-2-plugin-development-using-external-project-with-shared-code/225141 "2020-03-26T08:19:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javek](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Javek](https://discuss.elastic.co/u/Javek)\
**Post date:** [March 26, 2020, 8:19am UTC](https://discuss.elastic.co/t/kibana-7-4-2-plugin-development-using-external-project-with-shared-code/225141/1 "2020-03-26T08:19:43Z")

</div>

Hi. I am developing a plugin for kibana with react and typescript. I also have a separate node js backend that the plugin's backend communicates with.  
These plugins and the backend have a common code, which I put in a separate project.  
How can I make plugin-helpers pull a project with shared code as a dependency when building a plugin?  
I was thinking of a private npm repository. But I don't think this is the right decision for me.

Upd. I'm also thinking about using webpack before building the plugin

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [March 27, 2020, 3:43pm UTC](https://discuss.elastic.co/t/kibana-7-4-2-plugin-development-using-external-project-with-shared-code/225141/2 "2020-03-27T15:43:43Z")

</div>

A private npm repository doesn't sound like the worst approach, it depends a lot of your specific project - how many people are working on it? How are the individual artifacts deployed? Is there a CI and if yes how does it work? ....

A lightweight solution that comes to mind is to use git urls directly as dependency: [https://docs.npmjs.com/cli/install](https://docs.npmjs.com/cli/install)

---

<div class="post-metadata">

**Author:** ![Javek](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Javek](https://discuss.elastic.co/u/Javek)\
**Post date:** [March 27, 2020, 3:58pm UTC](https://discuss.elastic.co/t/kibana-7-4-2-plugin-development-using-external-project-with-shared-code/225141/3 "2020-03-27T15:58:57Z")

</div>

Thanks for reply.  
I just added my external project with shared code as git submodule to the root of plugin. Also i edited **.kibana-plugin-helpers.json** to this:

```auto
{
  "styleSheetToCompile": "public/app.scss",
  "buildSourcePatterns": [
    "yarn.lock",
    "tsconfig.json",
    "package.json",
    "index.{js,ts}",
    "server/**/*",
    "public/**/*",
    "MY_SHARED_PROJECT/src/**/*"
  ]
}

```

But using a npm private repository would be a better solution

---

<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:** [April 24, 2020, 3:59pm UTC](https://discuss.elastic.co/t/kibana-7-4-2-plugin-development-using-external-project-with-shared-code/225141/4 "2020-04-24T15:59:07Z")

</div>

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