Reputation: 5907
When using Meteor 1.3 with Mantra spec, what are the 'right' way and place to load external client script, I mean some JS library which has to be included client-side, with <script>...</script>
tag?
Upvotes: 0
Views: 86
Reputation: 1294
you can use npm or atmosphere for adding package or library. but if you want to add manualy using this meteor package kadira:dochead
use meteor add kadira:dochead
I created a addScript.js file inside client/configs
with the following code:
import {DocHead} from 'meteor/kadira:dochead';
export default function () {
let addScript = 'https://link-to-your-script';
DocHead.loadScript(addScript);
}
And imported it in client/configs/context.js
Upvotes: 2