Hacker News new | ask | show | jobs
by cimmanom 2824 days ago
Will it still be possible to run in an ES2015-compatible browser without transpiling? That was one of the killer features of Vue for me.
3 comments

Do you mean running Vue by just adding a script tag to the page? That will still work because it's just using a precompiled/transpiled JS file, which will continue to be available as part of the package. FYI, React can also run the same way.
As there is no mention of it, it should be available. After all, as you said, Modern mode is a killer feature.
How are they running TypeScript in the browser without transpiling?
You transpile TS at build time, i.e. when the library itself is built, not when your project is built.
Nope, and it won't run with ECMAScript-compatible editors, linters, static analyzers, or type checkers (see: Flow).

I can't imagine recommending TypeScript to anyone I like.

What are you talking about? Typescript is what the Vue source code will be written in, which is compiled to javascript when distributed and includes Typescript definitions for editors that make use of it.

Your code can continue to be written in regular javascript with whatever toolchain you want.

And Typescript is a fantastic platform for bringing strong typing to Javascript, it's a rather extreme comment to say you don't recommend it to anyone.

Why would you use flow with typescript? Also valid javascript is valid typescript, you can even have typescript's tooling lint your javascript with a jsconfig file.