Skip to content

Commit e68ab35

Browse files
committed
add additional explanation of rollup issue
1 parent ef10910 commit e68ab35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/material-moment-adapter/adapter/moment-date-adapter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import {Inject, Injectable, Optional} from '@angular/core';
1010
import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material';
1111

1212
// Depending on whether rollup is used, moment needs to be imported differently.
13+
// Since Moment.js doesn't have a default export, we normally need to import using the `* as`
14+
// syntax. However, rollup creates a synthetic default module and we thus need to import it using
15+
// the `default as` syntax.
1316
// TODO(mmalerba): See if we can clean this up at some point.
1417
import {default as _rollupMoment, Moment} from 'moment';
1518
import * as _moment from 'moment';

0 commit comments

Comments
 (0)