How to compile .vue without cli?
I have
main.vue
<script lang="ts">
type a = string;
let a = "we" as a;
alert(a);
</script>
and webpack.config.js
const { VueLoaderPlugin } = require("vue-loader");
module.exports = {
mode: "production",
entry: ["./main.vue"],
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
},
{
test: /\.(js|mjs|mjsx|ts|tsx)$/,
use: [
{
loader: "babel-loader",
},
{
loader: "ts-loader",
options: {
transpileOnly: true,
happyPackMode: false,
appendTsxSuffixTo: ["\\.vue$"],
},
},
],
},
],
},
plugins: [new VueLoaderPlugin()],
};
And trying to compile vue without vue cli, but I’m get an error
No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["src/main.vue"]' and 'exclude' paths were '["node_modules"]'.
How to compile vue+typescript without cli?
May I ask configuration examples without vue cli?
Read more here: Source link