Skip to content

Commit 0131525

Browse files
committed
chore: optimize data-fns import
1 parent e366444 commit 0131525

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const globals = {
3131
const thirdParty = [
3232
'htmlparser2',
3333
'prismjs',
34-
'date-fns',
34+
'date-fns/formatDistanceToNow',
3535
'date-fns/locale',
3636
'hex-color-converter',
3737
'is-url',

src/components/panoItemHeader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BoxLayout, Button, Icon, Label } from '@gi-types/st1';
66
import { registerGObjectClass } from '@pano/utils/gjs';
77
import { IPanoItemType } from '@pano/utils/panoItemType';
88
import { getCurrentExtension } from '@pano/utils/shell';
9-
import { formatDistanceToNow } from 'date-fns';
9+
import formatDistanceToNow from 'date-fns/formatDistanceToNow';
1010
import * as dateLocale from 'date-fns/locale';
1111

1212
const langs = get_language_names_with_category('LC_MESSAGES').map(

0 commit comments

Comments
 (0)