Merge pull request #18882 from ant-design/fix-intl-ssr-site

fix: site ssr react-intl
This commit is contained in:
信鑫-King 2019-09-18 07:58:24 -04:00 committed by GitHub
commit 69d079e0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -143,6 +143,7 @@
"devDependencies": {
"@ant-design/colors": "^3.1.0",
"@ant-design/tools": "^8.0.4",
"@formatjs/intl-relativetimeformat": "^4.0.1",
"@packtracker/webpack-plugin": "^2.0.1",
"@sentry/browser": "^5.4.0",
"@types/classnames": "^2.2.8",

View File

@ -2,6 +2,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import { enquireScreen } from 'enquire-js';
// https://github.com/formatjs/react-intl/issues/1487
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';