Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="app">
{{ message }}
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.js'></script>
<script src="app.js"></script>
</body>
</html>
app.ts :
import { Vue } from "vue/types/vue";
let vue = new Vue({
el:"#app",
data:{
text:"hello world"
}
})
After running tsc
, the generated JavaScript will look like this:
"use strict";
exports.__esModule = true;
var vue_1 = require("vue/types/vue");
var vue = new vue_1.Vue({
el: "#app",
data: {
text: "hello world"
}
});
Expected Output
I would like to avoid generating "exports.__esModule = true;" and "require("lib");"
var vue = new Vue({
el: "#app",
data: {
text: "hello world"
}
});
Note:
I utilize DefinitelyTyped for type definition