Skip to content

A quasar-framework demo to show a bug in the @quasar/typescript extension with vue-property-decorator

Notifications You must be signed in to change notification settings

Abuntxa/quasar-demo-typescript

Repository files navigation

Quasar App

Showed my problems when trying to use the extension of quasar-framework @quasar/typescript with the vue-property-decorator with the template and typescript code in the same file.

Steps to reproduce the environment

  1. Create a new quasar empty project with the newest quasar-cli (betav1)

quasar create -b dev

  1. Add the extension @quasar/typescript with the quasar-cli

quasar ext add @quasar/typescript

  1. Add the vue-property-decorator and vue-class-component dependency

yarn add vue-property-decorator vue-class-component

  1. Modify src/pages/Index.vue to make use of the decorator syntax (copy paste the vue-property-decorator example)

If I set the typescript code in a separate file and reference it from the template <script lang="ts" src="Index.ts" /> the compiling problems dissapear.

The problem was that the quasar project bootstrap adds an extra build step in order to lint the es6 which gets executed before transpiling the typescript code. Removing the contents from build.extendWebpack(cfg) in quasar.conf.js solved the issue.

About

A quasar-framework demo to show a bug in the @quasar/typescript extension with vue-property-decorator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published