xcatliu / react-ie8 Goto Github PK
View Code? Open in Web Editor NEWMake your React app work in IE8
Home Page: http://react-ie8.xcatliu.com/
Make your React app work in IE8
Home Page: http://react-ie8.xcatliu.com/
在低于ie11的版本中都会出现Set未定义的问题
Pls, can you helpme?
Your project includes the enquirejs dependency. But I have issues when try to run tests into my project because
matchMedia not present, legacy browsers require a polyfill
I don't know how to solve this issue.
this is my code
import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
// Import components for testing here
import NavbarCrm from '../NavbarCrmComponent';
describe('<NavbarCrm />', function () {
if (typeof window !== 'undefined') {
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
return {
media: mediaQuery,
matches: false,
addListener: function addListener() {},
removeListener: function removeListener() {}
};
};
window.matchMedia = window.matchMedia || matchMediaPolyfill;
}
it('should have props for heading and children', function (done) {
const wrapper = shallow(<Menu />);
expect(wrapper.props().classes).to.be.defined;
expect(wrapper.props().children).to.be.defined;
done();
});
});
I tried in all methods. Above, below but the same error ever.
Can U help me?
I cant to solve the issue putting
if (typeof window !== 'undefined') {
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
return {
media: mediaQuery,
matches: false,
addListener: function addListener() {},
removeListener: function removeListener() {}
};
};
window.matchMedia = window.matchMedia || matchMediaPolyfill;
}
I include the above code in the line 49826 located at andt.js file into my node_modules And the problem is over. but this is not a good solution.
into enquirejs/src/include/wrap.js into the dist file for npm installed module. But it isn't a pretty solution.
IE9不支持bind方法
Perhaps you are using Object.assign
.
如果需要使用 webpack.UglifyJsPlugin 并兼容IE8 ,请使用 [email protected]。
how to fix IE8(请问如何兼容IE8),when I clone this code and run,but it's still can't run in IE8(下载后仍然无法运行)
在IE11兼容模式下调试,React.createElement( .... 报错
typeerror 对象不支持“then”属性或方法
React Static Boilerplate 的在线演示,用IE8打开直接报错 “HTTP ERROR -2146697208”
run in ie8 。wrong at:‘extends’
babelHelpers.extends = Object.assign || function (target) {
我已经使用了es3ify-loader但是在 chunk文件中还是发现有default 关键字。这个问题怎么解决呢
IE8打开http://react-ie8.getfuli.com
主页是可以看的到,但是切换到路由counter页就404了
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
这个错误怎么解决的,ie8下
你好,我看到react-router-redux 4.x 中发布的代码部分如下:
Object.defineProperty(exports, 'LOCATION_CHANGE', {
enumerable: true,
get: function get() {
return _reducer.LOCATION_CHANGE;
}
});
Object.defineProperty(exports, 'routerReducer', {
enumerable: true,
get: function get() {
return _reducer.routerReducer;
}
});
....
这样的代码 哪怕用了polyfill 也没法兼容IE8了吧 ?
自定义组件的时候,不知道是否是这种写法, 在IE8下报错:
this.setState({flag:true},function(){
console.log(this.refs.nodeInput);
this.refs.nodeInput.select();
});
// 定义的地方如下:
Hi,
I am unable to open app in IE8 .
I tried to open http://react-ie8.getfuli.com, it loads and when clicked on counter link, I am getting 404 error.
Note: app is working find in latest ver. of IE ie. edge or 11.
"Babel transforms your import to Object.defineProperty which doesn't exist in IE8。"
It should be 'export' ,not 'import' . IE8 has Object.defineProperty Object.defineProperty.
now Babel fixed the transform, but has another problem: Babel transform "export xx from 'xxx' " to Object.defineProperty, like:
"
Object.defineProperty(exports, 'LOCATION_CHANGE', {
enumerable: true,
get: function get() {
return _reducer.LOCATION_CHANGE;
}
});
"
the accessor property not support in ie8.
so cannot use react-router-redux because it use "export xx from 'xxx' ";
how do i create prod build. Currently the compiled file is quite large.
Velocity: IE8 and below require jQuery to be loaded before Velocity. 这是什么情况,我引入了ANTDESIGN的menu控件,在IE8不支持
请移步这里:
zhoulijie/react-redux-support-ie8#3
看代码好像问题是在getter 上面。不知道怎么解决。。。
使用hello world的example在IE8上依然出现Object.defineProperty问题,目测是babel6的打包问题,不过还没有解决,有看到说是用babel6-loose-mode来解决的。求更新
in IE8, this will be error.
<div id="etDiv"> <span>4444</span> <div class="abc"></div> </div> <script></script> <script type="text/javascript"> var a = document.getElementById("etDiv"); var b = a.firstChild; alert(b.data.length); </script>
because b.data is undefined in IE8
我降低了antd的版本也不可以
matchMedia not present, legacy browsers require a polyfill
我已经按照你说的配置了 但是我的工程在ie8 下出现这个错误了
iconfont的unicode没有‘fish化’,如果antd和fish同时使用 有时候会出问题,建议加前缀什么的 隔离一下
Header and background defined out of react stuff appear at once, but all inside reacts "render" method needs too much time. But after everything rendered ALL pages work like they should, I mean at first nothing shown, then you can go from page to page and all is fast. This appears only in pure IE8, in IE9 compatibility mode all OK.
SCRIPT5022: 引发了异常但未捕获
es5-sham.min.js, 行6 字符3942
As I know, It's very painful to solve compatibility Issues in IE8.
So I'm considering to write a package to help people who are facing such problems.
With just one liner code:
require('react-ie8')(options);
Or insert umd js file into head?
<script src=".../react-ie8.js"></script>
<script>window.reactIE8(options)</script>
https://github.com/github/fetch only support ie9
怎么才能让babel6 的import不生成Object.defineProperties的代码?
我这边已经干掉了好些依赖 不想使用es5-shim等polyfill 有办法么?
(We won't actively remove IE 8–related code quite yet, but we will deprioritize new bugs that are reported. If you need to support IE 8 we recommend you stay on React v0.14.)
Officially it's said that IE8 is not supported but they will also not remove IE 8 related compatibility code. So there might be a chance that it still works with polyfills?
--hot 会生成一个 hotCreateRequire 的函数,其中有 indexOf,而 IE8 不支持
if(me.hot.active) {
/******/ if(installedModules[request]) {
/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
/******/ installedModules[request].parents.push(moduleId);
/******/ if(me.children.indexOf(request) < 0)
/******/ me.children.push(request);
/******/ } else hotCurrentParents = [moduleId];
/******/ }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.