diff --git a/src/components/Article.astro b/src/components/Article.astro index bffa206..62b0d53 100644 --- a/src/components/Article.astro +++ b/src/components/Article.astro @@ -2,6 +2,7 @@ import ArticleMenu from './ArticleMenu.astro'; import { AstroComponentFactory } from 'astro/dist/runtime/server'; +import IntlPolyfill from 'intl'; export interface Props { PostContent: AstroComponentFactory; @@ -29,7 +30,7 @@ function formatDate(obj?: Date) { const formatter = ( Intl.DateTimeFormat.supportedLocalesOf(locale).length ? Intl.DateTimeFormat : - require('intl').DateTimeFormat + IntlPolyfill.DateTimeFormat ); return new formatter(locale).format(obj);