title: How can i use Vue Async components?
body: <p>I'm using laravel 5.4 and vue 2 and I want to load a component as async using a button. My Vue js components are separate: example.vue and test.vue and I load them as an html tag.</p>
  
  <p>This is my app.js:  </p>
  
  <pre><code>import './bootstrap';
  import example from './components/Example.vue';
  
  Vue.component('example', example);
  
  const app = new Vue({
  el: '#app'
  });
  </code></pre>
  
  <p>This is the place to show components</p>
  
  <pre><code>    &lt;How can i use Async components?div id="app"&gt;
           &lt;example2&gt;&lt;/example2&gt; 
      &lt;/div&gt;
  </code></pre>
  
  <p>How can I use Async components?</p>
  
  <hr>
  
  <p>No, I think you don't understand me. It's my component registration </p>
  
  <pre><code>import './bootstrap';
  import example from './components/Example.vue';
  
  Vue.component('example', example);
  
  Vue.component('example2', function (resolve) {
  
  require(['./components/Example2.vue'],resolve)
  
  })
  
  
  const app = new Vue({
  el: '#app'
  });
  </code></pre>
  
  <p>and in require , it default resolved (as showing)
  I don't know how should I pass the resolve and reject keys to this method in my page when I call the component.</p>