I write a typescript 2.3 app.ts which needs Vuejs library v2. Vuejs script src is added manually in html file. I just want use Vuejs with type checking ! I expected i just have to reference like this :
/// < reference path="vue.d.ts" />
But the Vue class is not accessible from app.ts.
I tried to import the module directly :
import * as Vue from "./vue";
This time i have to use new Vue.Vue({}) to access to the class but VS 2017 build. The app.js generated starts with var Vue = require("./vue");. However in the browser, i got some errors :
- exports reference (solved by adding export = 0; at line 1 in .ts
- require is not a function
For require(), i add < script src="Scripts/require.js">< /script> but new error: has not been loaded yet for context.
I tried with systemjs instead of require.js, i add < script>System.import('scripts/app.js');< /script> i get a 404 accessing to "Scripts/vue" (the require from the app.js), the rest of app.js is not executed.
Note : i don't use tsconfig.json
I'm surprised cause in my memory, the reference of jQuery worked with typescript 0.9
I'm completely lost. Help me ! Thank you community !