# How to ship javascript library with plugin?

**URL:** <https://meta.discourse.org/t/how-to-ship-javascript-library-with-plugin/53190>\
**Category:** Development\
**Created:** [November 21, 2016, 12:07pm UTC](https://meta.discourse.org/t/how-to-ship-javascript-library-with-plugin/53190 "2016-11-21T12:07:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Post date:** [November 21, 2016, 12:07pm UTC](https://meta.discourse.org/t/how-to-ship-javascript-library-with-plugin/53190/1 "2016-11-21T12:07:04Z")

</div>

Hi,  
I’d like to ask what is recommended way to ship javascript library with some plugin? I can load it asynchronously from external url using e.g.

```
Em.$.getScript('https://cdnjs.cloudflare.com/ajax/libs/......min.js').done(function() {
...
}

```

But I’d prefer storing library locally. Normally I’d use `vendor.js` to include it and have it loaded before the plugin code, but this approach needs hacking with the Discourse core.. So what is recommended way and where to add external js library to plugin? Is there some convention? Thx.

---

_[View the full topic](https://meta.discourse.org/t/how-to-ship-javascript-library-with-plugin/53190)._
