nuxt-community / nuxt-property-decorator

Property decorators for Nuxt (base on vue-property-decorator)
https://github.com/kaorun343/vue-property-decorator
MIT License
400 stars 34 forks source link

Parsing error: Using the export keyword between a decorator and a class is not allowed #65

Closed davidquintard closed 4 years ago

davidquintard commented 4 years ago

Hi there, I get this issue: Parsing error: Using the export keyword between a decorator and a class is not allowed


<script lang="ts">
  import { Component, Prop, Vue } from 'nuxt-property-decorator';

  @Component
  export default class Contact extends Vue {
    ...
</script>````
domi91c commented 4 years ago

@pairmix Any luck solving this issue?

husayt commented 4 years ago

I just released v 2.7.1 of the library which fixes many issues. If your issues still exists, please, provide a link to codesandbox with the issue

dirodriguezm commented 4 years ago

I fixed it by adding

parserOptions: {
    ecmaFeatures: { legacyDecorators: true },
}