Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs IE11对象';指数';属性错误_Reactjs_Webpack_Internet Explorer 11_Webpack Dev Server - Fatal编程技术网

Reactjs IE11对象';指数';属性错误

Reactjs IE11对象';指数';属性错误,reactjs,webpack,internet-explorer-11,webpack-dev-server,Reactjs,Webpack,Internet Explorer 11,Webpack Dev Server,我使用的反应与网页使用巴贝尔加载器。我正在创建一个app.bundle.js,在Chrome中运行良好。但是,我无法在IE 11中运行,因为加载index.html时会出现以下错误:“Object不支持app.bundle.js中的属性或方法'indexOf'。 我已经将babel-polyfill包含在网页条目中,条目:['babel-polyfill','./src/index.js'], 此外,我还尝试在index.js中使用import语句包含babel polyfill,但没有成功。我

我使用的反应与网页使用巴贝尔加载器。我正在创建一个app.bundle.js,在Chrome中运行良好。但是,我无法在IE 11中运行,因为加载index.html时会出现以下错误:“Object不支持
app.bundle.js
中的属性或方法'indexOf'。 我已经将
babel-polyfill
包含在网页条目中,
条目:['babel-polyfill','./src/index.js'],

此外,我还尝试在
index.js
中使用
import
语句包含
babel polyfill
,但没有成功。我还尝试在
index.js
中使用
import
包含核心js,但无法解析。

您的浏览器似乎处于IE8环境中。尝试将
添加到HTML文件的顶部以及
元标记。

您是否在代码中导入了
babel polyfill
";是的,我也尝试过导入,但没有luckAh,我明白了。您的浏览器似乎认为它是@Tholle感谢您的指导。Doctype已经存在,但添加它解决了问题。看起来很奇怪。