What is the best way to add external javascript


#1

Hi, I am trying to add Conekta’s library (a payment system for México https://www.conekta.io/en/docs/references/conekta-js) on a Meteor app, but I don’t know where the right way or place to add this line could be:

<script type="text/javascript" src="https://conektaapi.s3.amazonaws.com/v0.3.2/js/conekta.js"></script>

As you can imagine I am starting developing in Meteor and in general, so any help would be greatly appreciated.

Thanks! :wink:


#2

You can save it inside client/compatibility folder.

check out Structuring your application doc


#3

When using Iron.Router I like using the wait-on-lib package to only load libraries on the routes where they are in fact required:
https://atmospherejs.com/manuelschoebel/wait-on-lib


#4

Check out this package

I’ve been using to use to meteor with ESRI’s dojo packages.