Closed xyjwsj closed 5 years ago
In latest nuxt it should have worked out of the box because it is adding this babel plugins, but for some reason they are ignored in generate mode.
Just add this to your nuxt-config for now and hopefully nuxt issue will make this redundant soon.
build: { babel: { plugins: [ [ "@babel/plugin-proposal-decorators", { legacy: true } ], [ "@babel/plugin-proposal-class-properties", { loose: true } ] ],
On Wed, 13 Mar 2019, 08:36 xyjwsj, notifications@github.com wrote:
Compile error with @prop https://github.com/prop project, error message ( Decorating class property failed. Please ensure that proposal-class-properties is enabled and set to use loose mode. To use proposal-class-properties in spec mode with decorators, wait for the next major version of decorators in stage 2. )
This is my code:
export default class Wrap extends Vue { @prop https://github.com/prop() nextBtn } use: <Wrap @nextpage https://github.com/nextpage="toNextPage" :nextBtn="next">
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nuxt-community/nuxt-property-decorator/issues/35, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHXrCu8WgJ9aWZScFf1kP44L_trdgHeks5vWLh0gaJpZM4bsqd0 .
Compile error with @prop project, error message ( Decorating class property failed. Please ensure that proposal-class-properties is enabled and set to use loose mode. To use proposal-class-properties in spec mode with decorators, wait for the next major version of decorators in stage 2. )
This is my code:
export default class Wrap extends Vue { @Prop() nextBtn } use: <Wrap @nextpage="toNextPage" :nextBtn="next">