No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Can I use vue-class-component ?

    Help
    4
    7
    2810
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      ryzskzkhie last edited by

      I tried using vue-class-component but I got this error.

      error

      I already include this “babel-plugin-transform-decorators-legacy”: “^1.3.4” in my devDependencies.

      Is anyone use vue-class-component in here ?

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        You may need typescript loader too. And specifying the typescript language in Vue files (on <script> tag).

        R 1 Reply Last reply Reply Quote 0
        • druppy
          druppy last edited by

          Typescript work with vue-class-component as long as you enable it in the tsconfig.json file. But this error looks like the babel decorator feature is not properly installed in webpack (I am no expert on babel).

          1 Reply Last reply Reply Quote 0
          • R
            ryzskzkhie @rstoenescu last edited by

            Hi @rstoenescu, I’m not using TypeScript in here. Just plain ES6.

            1 Reply Last reply Reply Quote 0
            • R
              ryzskzkhie last edited by

              This setup works when creating projects with vue-cli, but not on quasar-cli, even thought it both uses vue-loader.

              1 Reply Last reply Reply Quote 0
              • P
                paul last edited by

                try this: https://github.com/paulvanbladel/quasar-ts

                1 Reply Last reply Reply Quote 0
                • rstoenescu
                  rstoenescu Admin last edited by

                  @ryzskzkhie vue-class-component is part of Typescript, so unless you want TS, don’t use it cause it’s not necessary.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post