Home  >  Article  >  Web Front-end  >  Solution to the white screen of IE browser under vue2.0 (detailed process)

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

不言
不言Original
2018-09-14 14:55:463148browse

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

Summary method:

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

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

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 <p>Run after the above operations are completed</p> <pre class="brush:php;toolbar:false">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!

Statement:
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