vuejs / vue-class-component

ES / TypeScript decorator for class-style Vue components.
MIT License
5.81k stars 429 forks source link

[SOLVED] [UPDATE DOCS] Where is the updated "Get Started"? #587

Closed angelhdzmultimedia closed 2 years ago

angelhdzmultimedia commented 2 years ago

I tried the code in https://class-component.vuejs.org/guide/class-component.html#data and it doesn't work. I tried @Component({}) as well. I tried creating a @vue/cli project to see the dependencies and copy them in my actual project:

import { Options, Vue } from 'vue-class-component';

@Options({
  components: {

  },
})
export default class Home extends Vue {}

Not working either.

I created the .babelrc with:

{
    "plugins": [
      ["@babel/proposal-decorators", { "legacy": true }],
      ["@babel/proposal-class-properties", { "loose": true }]
    ]
  }

And added experimentalDecorators in tsconfig.json.

angelhdzmultimedia commented 2 years ago

Solved

Installed 8.0.0-rc.1.