Discussing the challenges faced in "angular2-meteor" github issue threads:
There are various approaches to solving this issue: you have the option to install , or,
considering Meteor 1.3's preference for NPM, you could opt for Tether NPM installation and require it before utilizing bootstrap 4. Alternatively, for more customization, you can create your own local package (in the packages folder) containing all necessary dependencies from NPM, including Tether (similar approach to angular2-runtime in this repository).
I am eager to test this out as I believe it will resolve the issue :) Thanks a lot @barbatus ;)
Update:
I have decided to go with the npm package solution and already had tether installed. If you don't have it yet, follow these steps first:
npm install --save tether
Merely using a single require
statement won't suffice.. since bootstrap 4 that I intend to integrate requires a window.Tether
function. Here is how I resolved it:
let Tether = require('tether');
window.Tether = Tether;
// import all bootstrap javascript plugins
require('bootstrap');
An added advantage is the availability of typings definition file now, simply add it by executing:
typings install --save --ambient tether
By incorporating it into the window global context, the errors vanished... although, admittedly, the webpack provide plugin solution still seems cleaner -> it provides the Tether object separately for each module during compilation, preventing it from residing in the window global context. Nonetheless, I'm relieved that it works for me at this point :)
PS: jQuery is automatically included by meteor, hence why adding tether alone suffices.
Update: indeed jQuery comes preloaded - but remember, it's just a package in your /.meteor/packages file ;)