Skip to content

Commit

Permalink
fix: import date-fns by esm (#1961)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Mar 17, 2021
1 parent da4bd06 commit 529eea5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _mock/_chart.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import format from 'date-fns/format';
import { format } from 'date-fns';
import * as Mock from 'mockjs';

// region: mock data
Expand Down
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"@antv/util",
"file-saver",
"hammerjs",
"ajv"
"ajv",
"date-fns"
]
},
"configurations": {
Expand Down
4 changes: 1 addition & 3 deletions src/app/layout/basic/widgets/notify.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';
import { NoticeIconList, NoticeIconSelect, NoticeItem } from '@delon/abc/notice-icon';
import add from 'date-fns/add';
import formatDistanceToNow from 'date-fns/formatDistanceToNow';
import parse from 'date-fns/parse';
import { add, formatDistanceToNow, parse } from 'date-fns';
import { NzI18nService } from 'ng-zorro-antd/i18n';
import { NzMessageService } from 'ng-zorro-antd/message';

Expand Down

0 comments on commit 529eea5

Please sign in to comment.