This is an example repository demonstrating how to use vue-custom-element with TypeScript.
To get started:
npm install
npm run dev
Then visit localhost:8081.
This project was generated using vue-cli with the webpack template. Things to note:
- The
sfc.d.tsfile solves a well-known issue where TypeScript does not understand what*.vuefiles are. - The entry file is
src/main.ts. The component being used as a Vue Custom Element issrc/example-component.vue.src/main-component.vueis a simple wrapper component that is mounted on the HTML page.