Static GitHub Issues

[3116] How to lazy load components?

prev: Feature request: Brotli compression with GZIP fallback
next: 403 - In a weird way?

Hello. I have admin route where I have big Component that uses few external libraries. This route will be avaliable only for me, not for users of my site. RIght now it's loaded from the start even if I on another route.

I tried this

const vue2Dropzone = () => import('vue2-dropzone')
components: {
    vueDropzone: vue2Dropzone
  }

But still chunk is loaded even if I am not on this route. What is the logic behinfd this? How to actually load code only when I need it? Why it is not working out of the box?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2698">#c2698</a>)</em></sub></div>