VUE CLI-3 Project not working on IE-11

后端 未结 2 678
野性不改
野性不改 2020-12-08 17:05

I have created an project in vuejs using vue-cli3. It working fine on chrome browser but in IE-11 version blank screen is shown with the following error in console as mentio

相关标签:
2条回答
  • 2020-12-08 17:44

    Another solution: use the power of vue-cli-3 to leverage browser support: https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode

    Just one option when building and you're done once you've chosen browserslist to support :-)

    This should work well for building an app.

    0 讨论(0)
  • 2020-12-08 17:51

    I finally ended up with the solution of above issue. To run project on IE-11 version just follow the 2 steps:

    1. Install babel-polyfill using command "npm install --save babel-polyfill".
    2. Import babel-polyfill in your main.js or index.js file at the top of above all imported packages. For e.g Here is your main.js file.

    Note: If you import babel-polyfill at the end it does't work.

    import 'babel-polyfill'  
    import Vue from 'vue'
    import Vuetify from 'vuetify'
    
    import router from './router'
    // include script file
    import './lib/DemoScript'
    
    // include all css files
    import './lib/DemoCss'
    
    Vue.use(Vuetify)
    
    new Vue({
        store,
        router,
        render: h => h(App),
        components: { App }
    }).$mount('#app')
    
    0 讨论(0)
提交回复
热议问题