配置Umijs支持IE11非常简单,打开你的项目。找到.umirc.js文件,在.umirc.js文件中添加如下内容:
targets: { ie: 11, }
完整的配置如下:
// ref: https://umijs.org/config/ export default { treeShaking: true, targets: { ie: 11, // 支持IE11 }, plugins: [ // ref: https://umijs.org/plugin/umi-plugin-react.html ['umi-plugin-react', { antd: false, dva: false, dynamicImport: false, title: 'umi-hello', dll: false, routes: { exclude: [ /components\//, ], }, }], ], }