title: Dynamic import javascript library
body: <p>I'm using VueJS 2 and I want to import dynamically my javascript library which is vue-slick-carousel so I made a function to do that :</p>
  <pre><code>vueSlickCarousel: () =&gt; import(/* webpackPrefetch: true */ 'vue-slick-carousel')
  </code></pre>
  <p>But I also have to import the css of the library and I can't do that in the function or I haven't found how to do it so I put it at the beginning of my javascript file</p>
  <pre><code>// Vue Slick
  import 'vue-slick-carousel/dist/vue-slick-carousel.css';
  
  export default {
      name: &quot;CalendarComponent&quot;,
      props: ['value', 'isOpenSaturdayMorning', 'isOpenSaturdayAfternoon'],
      components: {
          vueSlickCarousel: () =&gt; import(/* webpackPrefetch: true */ 'vue-slick-carousel'),
      },
  </code></pre>
  <p>How can I make a function that import dynamically both javascript and css file of the library ?</p>