A
A
Alexander2017-02-14 10:01:31
JavaScript
Alexander, 2017-02-14 10:01:31

How to setup vue.js (with vue-loader) + typescript (or flow)?

Actually, the whole question is in the title. There is a Vue2 project that uses vuex + vue-router and is built by webpack with vue-loader . I would like to add typechecking to it, because it is already becoming difficult to keep track of all the objects in the store. I spent a couple of days on this whole thing, it turned out to be quite simple to convert all *.js files to *.ts, but when I started *.vue , I was horrified. A bunch of different guides with a bunch of different additional loaders, decorators and other beauties, but none of them work as they should. I feel like I'm doing something wrong, but I can't figure out what it is.
Perhaps someone has a template for such projects lying around? Or, if not,typescript , maybe there is an example for flow or tcomb ?
Thanks in advance!
PS I don’t see the point in throwing the code, there are too many of them. But it does not go far beyond the standard architecture for the vue + vuex + vue-router bundle.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2017-02-23
@tusklozeleniy

And what is in the documentation is not enough:
TypeScript support
An example of vue-class-component and TypeScript
A template for vue-cli by Konstantin Kitmanov

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question