ANT DESIGN PRO 不能在QQ浏览器上运行 以及解决方法
如果在QQ浏览器中使用,可能会报错
[React Intl] The `Intl` APIs must be available in the runtime, and do not appear to be built-in. An `Intl` polyfill should be loaded.
不能正常显示
如何解决呢?
解决方法的来源:
https://github.com/ant-design/ant-design-pro/issues/2149
https://github.com/yahoo/react-intl/issues/635
https://github.com/yahoo/react-intl/issues/422
第一步:
$ cnpm install --save intl @babel/polyfill
第二步:
在src下的 global.js添加
import '@babel/polyfill';
global.Intl = require('intl');
window.Intl = require('intl');
如图所示
最后成功如图所示: