I'm working with es6 modules. In some of them I use lodash. My question is - is it possible to load lodash as global variable, or it should be imported in all files separately? I tried this in my initializer:
import lodash from 'lodash';
window._ = lodash;
Also this way:
window._ = require('lodash');
But it doesn't work. In my modules I get errors when use, for example, _.truncate:
TypeError: Cannot read property 'truncate' of undefined