Просмотр исходного кода

polyfill with umi-plugin-react

sorrycc 7 лет назад
Родитель
Сommit
50cd334f27
3 измененных файлов с 1 добавлено и 13 удалено
  1. 1 0
      config/config.js
  2. 0 1
      src/global.js
  3. 0 12
      src/polyfill.js

+ 1 - 0
config/config.js

@@ -20,6 +20,7 @@ export default {
           default: 'zh-CN', // default zh-CN
           baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default
         },
+        polyfills: ['ie9'],
         ...(
           require('os').platform() === 'darwin'
           ? {

+ 0 - 1
src/global.js

@@ -1 +0,0 @@
-import './polyfill';

+ 0 - 12
src/polyfill.js

@@ -1,12 +0,0 @@
-import '@babel/polyfill';
-import 'url-polyfill';
-import setprototypeof from 'setprototypeof';
-
-// React depends on set/map/requestAnimationFrame
-// https://reactjs.org/docs/javascript-environment-requirements.html
-// import 'core-js/es6/set';
-// import 'core-js/es6/map';
-// import 'raf/polyfill'; 只兼容到IE10不需要,况且fetch的polyfill whatwg-fetch也只兼容到IE10
-
-// https://github.com/umijs/umi/issues/413
-Object.setPrototypeOf = setprototypeof;