How to use Vue on tsx files

index.tsx

hello world</div>
    }
}).$mount("-sharpapp")

webpack.js

const path = require("path");
module.exports = {
    resolve: {
        extensions: [".tsx", ".ts", ".js", ".vue", ".json"],
        alias: {
            "vue$": "vue/dist/vue.esm.js"
        }
    }
};

most of the tutorials on the network are implemented by adding tsx lang with script tags in .vue files, so how to write Vue? directly in tsx

May.10,2021

import { Vue, Component } from 'vue-property-decorator';

@Component
export default class CommonView extends Vue {
  public render() {
    return <div />;
  }
}

just name it the tsx suffix

Menu