Comments (4)
会不会是 polyfill 有些问题,我这边配置 targets 为 { ie: 11 } 之后,可以在 IE 9 里跑了
from plugins.
排查过程
仔细排查了下,发现和 plugin-model 依赖的 lodash.isequal 有关,他里面有这么一段,
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
// ..
}
其中 new ArrayBuffer(1)
会报错,猜测原因可能是 1) polyfill 有问题 2) ie9 本身对于 ArrayBuffer 的处理问题。
他们引入的补丁方案差异如下,
// ie9
es.array-buffer.constructor { "edge":"13", "ie":"9", "ios":"10", "safari":"10" }
es.array-buffer.is-view { "ie":"9" }
es.array-buffer.slice { "ie":"9", "ios":"10", "safari":"10" }
// ie11
es.array-buffer.constructor { "edge":"13", "ie":"11", "ios":"10", "safari":"10" }
es.array-buffer.slice { "ios":"10", "safari":"10" }
ie9 多一个 is-view 的实现,但看起来不是关键问题。
建议方案
lodash.isequal 实现太复杂了,尺寸也大,有 50K 左右,换个方案吧。
from plugins.
请问这个问题什么时候可以解决
from plugins.
排查过程
仔细排查了下,发现和 plugin-model 依赖的 lodash.isequal 有关,他里面有这么一段,
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { // .. }其中
new ArrayBuffer(1)
会报错,猜测原因可能是 1) polyfill 有问题 2) ie9 本身对于 ArrayBuffer 的处理问题。他们引入的补丁方案差异如下,
// ie9 es.array-buffer.constructor { "edge":"13", "ie":"9", "ios":"10", "safari":"10" } es.array-buffer.is-view { "ie":"9" } es.array-buffer.slice { "ie":"9", "ios":"10", "safari":"10" } // ie11 es.array-buffer.constructor { "edge":"13", "ie":"11", "ios":"10", "safari":"10" } es.array-buffer.slice { "ios":"10", "safari":"10" }
ie9 多一个 is-view 的实现,但看起来不是关键问题。
建议方案
lodash.isequal 实现太复杂了,尺寸也大,有 50K 左右,换个方案吧。
@sorrycc 请问下有解决方案吗? 升级到哪个plugin-model版本能解决呢?我们急需支持IE
from plugins.
Related Issues (20)
- Uncaught Error: single-spa minified message #13
- 建议plugin-qiankun和qiankun保持同步,怎加自定义fetch请求 HOT 1
- @umijs/plugin-openapi 插件umi4报错api.addMiddewares is not a function
- 主应用路由是 hash 模式的话,子应用使用 history 模式是不是无法接入?
- 由于本项目的依赖有点旧,让项目安装依赖的时候出现少量 deprecated
- 希望@umijs/plugin-openapi增加serversPath参数
- 使用@ant-design/pro-* 编译了超多的var变量 HOT 1
- 升级 react 18, qiankun 报错Unhandled Rejection (TypeError): m.createRoot is not a function
- useModel 不能在ReactDom.render 内使用
- openapi 配置中 customFunctionName 和 customClassName 该如何使用
- 二级菜单可以设置默认展开么,没有找到相关配置
- antd pro 项目使用@umijs/plugin-qiankun改造成微前端,如何在主应用的二级菜单中指向子应用的某个非首页路由呢?
- antd pro 4.0.0 在哪里添加qiankun lifecycle函数呢?
- 使用initial-state等插件报错
- layout插件中,如何使用onCollapse
- qiankun父应用进入微应用,微应用的路由一直作用在夫应用上 HOT 2
- 希望 openapi 插件传递所有 hook 参数
- qiankun 在子应用页面刷新浏览器后在切换到另一个子应用页面,报错 Wrapper element for xxx is not existed! HOT 1
- Feature Request Server Side Render Routes HOT 1
- 偶现多次主页面和子页面切换之后报错,跳转404页面
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugins.