The content of this article is about the solution to the white screen of IE browser under vue2.0 (detailed process). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. helped.
The company’s newly developed projects need to be compatible with IE9
Just add it to the index.html page
<meta>
It doesn’t work
Compatible with IE9/IE10, you may encounter syntax or Promise errors. Install babel-polyfill
npm install babel-polyfill
Configure main at the page entry Introduce babel-polyfill
import("babel-polyfill")
into .js to solve compilation errors----Important
重新安装一下webpack-dev-server npm install webpack-dev-server@2.6.1 如果有淘宝镜像也可使用 cnpm
Modify under build/webpack.base.conf.js
app:['babel-polyfill','./src/main.js']
Install babel-preset-es2015-ie
Create a new .babelrc in the root directory
{ "presets": [ ["env", { "modules": false, "targets": { "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] } }], "stage-2" ], "plugins": ["transform-runtime"], "env": { "test": { "presets": ["env", "stage-2"], "plugins": ["istanbul"] } } }
Run after the above operations are completed
npm run dev
Related recommendations:
Browser hack summary Detailed browser compatibility solutions
phpMyAdmin 3.5.8 in Safari Blank screen solution
The above is the detailed content of Solution to the white screen of IE browser under vue2.0 (detailed process). For more information, please follow other related articles on the PHP Chinese website!