Vue-cli 3.x error report in IE11

problem description

IE11 reports the following error:
[vuex] vuex requires a Promise polyfill in this browser.

the environmental background of the problems and what methods you have tried

developers have not found any problems under chrome. Today, tests under ie found compatibility errors.
similar to symbol nonexistent errors
so they tried to add polyfill
to the project. According to the official document:

issue</a><br>  import "es6-promise/auto" ..

<ol><li></ol>

"@vue/cli-plugin-babel": "^3.1.1",

:

entry: {
    app: ["babel-polyfill", "./src/main.js"]
}

this project is a multi-page application built with vue-cli3, so you can"t configure it all over and over again.

I finally compromised and configured each page entry:
{entry: ["@ babel/polyfill", "xxx/index.js"]
the result was mercilessly rejected: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object

I am desperate now.


the final solution is
babel.config.js

module.exports = {
  // presets: [ '@vue/app' ],
  presets: [
    [
      '@vue/app',
      {
        useBuiltIns: 'entry'
      }
    ]
  ]
}

add import'@ babel/polyfill'

to the top of the entry file.

Measurement is compatible with IE10

then in public/index.html (template) head add:
< meta name= "renderer" content= "webkit | ie-comp | ie-stand" >
first force the browser to use webkit kernel (extreme kernel)
if the browser does not have a webkit kernel, render the page according to the latest ie trident kernel supported by the user browser (ie compatible kernel)
otherwise render according to the current browser standard kernel (ie standard kernel)

Note: I think this scheme is more hack.. Will contain some unused polyfill , so the final package size may increase.

vue-cli-service build --modern

vue-cli 3.x there is a modern mode after testing, it is found that ie is fine, chrome is not.. This needs to be tested again.

Thank you @ for trying to learn to smile, and other respondents.


  https://ligang.blog.csdn.net/.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1becb1b-1405b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1becb1b-1405b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?