Umi: Android 安卓手机 QQ浏览器 打不开umi 搭建的项目 其他浏览器都行, 应该是国际化的问题

Created on 15 Jul 2020  ·  2Comments  ·  Source: umijs/umi

"umi": "^2.9.0",
"umi-plugin-locale": "^2.11.6",
"umi-plugin-react": "^1.15.8"

targets: {
ie: 11,
},
提示这个错误:
[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.

ie9时
targets: {
ie: 9,
},
这个错
21594777864_ pic

type(umi@2)

Most helpful comment

需要单独引入intl这个包,并且在入口处引用

import 'intl';
import 'intl/locale-data/jsonp/en';

All 2 comments

需要单独引入intl这个包,并且在入口处引用

import 'intl';
import 'intl/locale-data/jsonp/en';

需要单独引入intl这个包,并且在入口处引用

import 'intl';
import 'intl/locale-data/jsonp/en';

感谢 大神 ; 在src 下新建 global.js 加入上面的 内容就行

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kitebear picture kitebear  ·  3Comments

ddzy picture ddzy  ·  3Comments

stoneWeb picture stoneWeb  ·  3Comments

miaojinxing picture miaojinxing  ·  3Comments

ironyfive picture ironyfive  ·  3Comments