Vue-class-component: How do I do lazy loading?

Created on 25 Oct 2017  路  6Comments  路  Source: vuejs/vue-class-component

How do I do lazy loading? Is it possible? Are async components possible using this library?

All 6 comments

Yes you can.

Why did you close this topic? Is it possible that you are rude enough to do this without giving me any example code or a clue???

Lazy loading can significantly improve loading speed, and it would be nice to include some king of tricks and tips section in Readme.md about this.

Just write as same as you write async component in normal vue way. https://vuejs.org/v2/guide/components.html#Async-Components

As written in README:

For all other options, pass them to the decorator function.

So you can use component option in the decorator:

@Component({
  components: {
    // async components here
  }
})
class App extends Vue {}

BTW, issue tracker is dedicated for bug reports and feature request. Please use our forum, chat room or StackOverflow to ask your question in the future. Thanks!

Thanks.

Github issue isn't a place for q&a.

It's really rude to raise a issue that even doesn't qualify as a stackoverflow question.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

championswimmer picture championswimmer  路  3Comments

tonypee picture tonypee  路  5Comments

KokoDoko picture KokoDoko  路  6Comments

backbone87 picture backbone87  路  4Comments

dmitrykurmanov picture dmitrykurmanov  路  4Comments