http-vue-loader
http-vue-loader copied to clipboard
IE 11 - "Failed to resolve async component default: InvalidStateError"
My app is working in all browsers except IE11, and as far I read (I hope I didn't skip any relevant line) it say it also work on IE11.
I've a component that is used on my router. when I'm using the app and navigate to this route, I've this issue on IE11 console.

As it's a legacy app, I'm trying to convert all the routes and components a proper singleFileComponent.vue, then after this implement the build process in it.
Here's a summary of how I'm using. It's working on Edge, Chrome, Safari, Opera and Samsung. Only missing IE11 to make everything perfect for us.
I've tried
index.html
<head>
...
<script type="text/javascript" src="/js/vue.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/src/httpVueLoader.min.js"></script>
</head>
main.js
var routes = [
{
name: "root",
path: "/"
},
{
name: "pathToComponent",
path: "/pathToComponent",
component: window.httpVueLoader('/view/component.vue')
}
]
var router = new VueRouter({routes:routes});
var app = new Vue({
el: "#app",
router: router,
...
myComponent.vue
<template>
<div class="dark" >
<h1>{{myText}}</h1>
</div>
</template>
<script>
module.exports = {
data: function() {
return {
myText: 'Hiii',
}
},
mounted: function () {
console.log("mounted Component")
}
}
</script>
<style scoped>
.dark{
background-color: black;
color: white;
}
</style>
a dup of #83