From 9515cef21d799811074830116feef64ab7ef1497 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Wed, 18 Sep 2019 19:07:17 +0800 Subject: [PATCH] fix: site ssr react-intl --- site/theme/template/Layout/index.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/theme/template/Layout/index.jsx b/site/theme/template/Layout/index.jsx index 5f4cd3cdb3..7dd8311cd1 100644 --- a/site/theme/template/Layout/index.jsx +++ b/site/theme/template/Layout/index.jsx @@ -2,6 +2,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import { enquireScreen } from 'enquire-js'; +import '@formatjs/intl-relativetimeformat/polyfill'; +import '@formatjs/intl-relativetimeformat/dist/locale-data/zh'; +import '@formatjs/intl-relativetimeformat/dist/locale-data/en'; import { IntlProvider } from 'react-intl'; import { Helmet } from 'react-helmet'; import 'moment/locale/zh-cn';