wedge
During the project development, after switching to IE11, I found that the whole page was blank, so I quickly checked relevant information and processed it.
why
The cause of this problem is that IE11 does not support ES6 + code. Vue-cli by default does not parse code in node_modules with Babel. By default, Babel only parses new JavaScript syntax, not new apis.
The solution
Case one: It’s simply a syntax that relies on ES6 +
You can configure the transpileDependencies to be resolved using the transpileDependencies configuration item provided by vue-CLI.
Case 2: Some dependency or project itself uses a new API based on case 1
New apis such as Iterator, Generator, Set, Proxy, Symbol, etc
Babel-polyfill NPM install –save-dev babel-polyfill and configure configureWebpack in vue.config.js: config => { config.entry.app = [“babel-polyfill”, “./src/main.js”]; },