[Vuejs]-How do i add typescript support to CDN version of vue?

0👍

Not sure if this solves the original problem but if you’re not using Vue CLI (or even npm packages) and are pulling in the Vue library via a CDN, you could try:

const Vue = (window as any).Vue;

at the top of your .ts file instead of an import.

It’s a bit hacky since your not getting any typing information for Vue (that said, it’s not much of a loss for Vue version 2) but it might get you going.

Leave a comment