Home > Web Front-end > JS Tutorial > body text

Solution to the white screen of IE browser under vue2.0 (detailed process)

不言
Release: 2018-09-14 14:55:46
Original
3152 people have browsed it

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>
Copy after login

It doesn’t work

Summary method:

Compatible with IE9/IE10, you may encounter syntax or Promise errors. Install babel-polyfill

npm install babel-polyfill
Copy after login

Configure main at the page entry Introduce babel-polyfill

import("babel-polyfill")
Copy after login

into .js to solve compilation errors----Important

重新安装一下webpack-dev-server
npm install webpack-dev-server@2.6.1 如果有淘宝镜像也可使用 cnpm
Copy after login

Modify under build/webpack.base.conf.js

Solution to the white screen of IE browser under vue2.0 (detailed process)

app:[&#39;babel-polyfill&#39;,&#39;./src/main.js&#39;]
Copy after login

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"]
    }
  }
}
Copy after login

Run after the above operations are completed

npm run dev
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template