Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

IE 11 - "Failed to resolve async component default: InvalidStateError" #87

Open
AEsmerio opened this issue Oct 31, 2019 · 1 comment
Open

Comments

@AEsmerio
Copy link

AEsmerio commented Oct 31, 2019

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.

image

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>
@littlephone
Copy link

a dup of #83

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants