Can I use vue-class-component ?
-
I tried using vue-class-component but I got this error.
I already include this “babel-plugin-transform-decorators-legacy”: “^1.3.4” in my devDependencies.
Is anyone use vue-class-component in here ?
-
You may need typescript loader too. And specifying the typescript language in Vue files (on
<script>
tag). -
Typescript work with
vue-class-component
as long as you enable it in thetsconfig.json
file. But this error looks like the babel decorator feature is not properly installed in webpack (I am no expert on babel). -
Hi @rstoenescu, I’m not using TypeScript in here. Just plain ES6.
-
This setup works when creating projects with vue-cli, but not on quasar-cli, even thought it both uses vue-loader.
-
-
@ryzskzkhie
vue-class-component
is part of Typescript, so unless you want TS, don’t use it cause it’s not necessary.