https://github.com/alexjoverm/vue-typescript-starter
TypeScript starter project based on Vue-cli webpack template
https://github.com/alexjoverm/vue-typescript-starter
typescript vue vue-cli webpack
Last synced: about 1 year ago
JSON representation
TypeScript starter project based on Vue-cli webpack template
- Host: GitHub
- URL: https://github.com/alexjoverm/vue-typescript-starter
- Owner: alexjoverm
- Created: 2017-05-13T15:55:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T10:45:28.000Z (over 8 years ago)
- Last Synced: 2025-04-03T10:43:58.436Z (about 1 year ago)
- Topics: typescript, vue, vue-cli, webpack
- Language: JavaScript
- Size: 20.5 KB
- Stars: 64
- Watchers: 8
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue TypeScript Starter
Basic starter based on [Webpack](https://github.com/vuejs-templates/webpack) from [Vue cli](https://github.com/vuejs/vue-cli) used in the course **[Use TypeScript to Develop Vue.js Web Applications](https://egghead.io/courses/use-typescript-to-develop-vue-js-web-applications)**
## How to TypeScriptify your Vue project
Here are the steps taken in this starter:
- Add [tsconfig.json](https://github.com/alexjoverm/Vue-Typescript-Starter/blob/master/tsconfig.json)
- Add [tsloader to build/webpack.base.conf.js](https://github.com/alexjoverm/Vue-Typescript-Starter/blob/master/build/webpack.base.conf.js#L30), plus add/update extensions to ts. Remember to install ts-loader and TypeScript
- Add [vue-shim.d.ts](https://github.com/alexjoverm/Vue-Typescript-Starter/blob/master/vue-shim.d.ts) in order to TypeScript recognize and treat .vue files
- [build/vue-loader.conf.js](https://github.com/alexjoverm/Vue-Typescript-Starter/blob/master/build/vue-loader.conf.js#L12): add `esModule: true`
- Rename `.js` to `.ts` files in `src` folder
- Use `lang="ts"` in .vue files