I use r.js
optimizer to bundle my project.
In some places, I must load files synchronously like here:
define('module-name', ['adal-angular'], function () {
var app = angular.module('myApp', ['AdalAngular']);
In the require.config.js
I have this:
paths: {
adal: 'bower_components/adal-angular/dist/adal.min',
'adal-angular': 'bower_components/adal-angular/dist/adal-angular.min',
}
and Shim:
shim: {
'adal-angular': ['angular', 'adal'],
}
My optimize configuration contains:
findNestedDependencies: true,
Yet adal
and adal-angular
are not included in the bundled file, unless I add this line somewhere in my code: require("adal-angular")
- which is redundant and I would like not to do that.