From 27a022922370947d54c3cfd357399eb588e8d01f Mon Sep 17 00:00:00 2001 From: Aleksei Lissitsin Date: Thu, 9 Mar 2017 12:39:47 +0200 Subject: [PATCH] feat(package): changed the way moment is imported (#1556) * Fix rollup error. Rollup cannot process `import * as moment from 'moment'`, instead `import moment from 'moment'` should work. See https://github.com/rollup/rollup/issues/670 * fix typescript compilation --- src/datepicker/date-formatter.ts | 2 +- src/tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/datepicker/date-formatter.ts b/src/datepicker/date-formatter.ts index 832a44523d..e88650cec6 100644 --- a/src/datepicker/date-formatter.ts +++ b/src/datepicker/date-formatter.ts @@ -1,4 +1,4 @@ -import * as moment from 'moment'; +import moment from 'moment'; export class DateFormatter { public format(date:Date, format:string):string { diff --git a/src/tsconfig.json b/src/tsconfig.json index 23df85bc8d..8acf8cd342 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -13,6 +13,7 @@ "declaration": true, "skipLibCheck": false, "stripInternal": true, + "allowSyntheticDefaultImports": true, "noUnusedLocals": false, "noUnusedParameters": false, "lib": ["dom", "es6"],