After a night sleeping on the issue, found the solution.
DayPilot registers the module in angular using angular.module("daypilot",[]) so in order to register one needs to use the 'daypilot' module name as a string. In addition, to be able to use the DayPilot object in the controllers, I ended up storing the DayPilot object as an Angular constant.
Here is the implemented solution:
/* app.js */
const DayPilot = require('exports-loader?DayPilot!imports-loader?angular!./modules/daypilot-all.min.js')
import ScheduleCtrl from './schedule/schedule.controller'
angular.module('myApp', [
...,
'daypilot',
])
.constant('DayPilot', DayPilot)
.controller('ScheduleCtrl', ScheduleCtrl)
/* schedule.controller.js */
export default class ScheduleCtrl {
constructor (DayPilot) {
this.config = {
scale: "Day",
days: 14,
startDate: "2017-06-24",
timeHeaders: [
{ groupBy: "Month" },
{ groupBy: "Day", format: "d" }
],
resources: [
{ name: "Room B", id: "B" },
{ name: "Room C", id: "C" },
{ name: "Room D", id: "D" },
{ name: "Room E", id: "E" }
]
}
this.events = [
{
start: new DayPilot.Date("2017-06-24T00:00:00"),
end: new DayPilot.Date("2017-06-26T00:00:00"),
id: DayPilot.guid(),
resource: "B",
text: "One-Day Event"
}
]
}
}