[Vuejs]-Vue components does not appear on IE11 (Laravel)

0👍

Try this.

  1. Install babel polyfill
npm install --save @babel/polyfill or yarn add @babel/polyfill
  1. Add the code import @babel/polyfill to src/main.js.
import '@babel/polyfill'
import Vue from 'vue'
// ...
  1. Change the babel.config.js as follows:
module.exports = {
  presets: [
    [
      '@vue/app',
      {
        'useBuiltIns': 'entry'
      }
    ]
  ]
}
  1. Create the vue.config.js file and create:
    (Add existing settings if they already exist.)
const ansiRegex = require('ansi-regex')

module.exports = {
    ......(기존 설정이 있다면 다음에 추가)
    transpileDependencies: [ansiRegex]
}

Note. Use es6-promise when using a promise pattern.

Leave a comment