emberjs / ember-cli-babel

Ember CLI plugin for Babel
MIT License
153 stars 120 forks source link

Error: Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform. #447

Open NullVoxPopuli opened 2 years ago

NullVoxPopuli commented 2 years ago

This error occurs when I'm consuming a V2 addon that has not complied away class properties.

This is incorrect behavior, because

NullVoxPopuli commented 2 years ago

Here is a reproduction: https://github.com/NullVoxPopuli/ember-resources/pull/616 this PR demonstrates that by not compiling away properties, you can see from a 5% to 68% reduction in files size (after minification)

the ember app gives this error:

Error: Decorating class property failed. 
Please ensure that proposal-class-properties is enabled and runs after the decorators transform.
NullVoxPopuli commented 2 years ago

ah ok, getting context back now -- I saw this in the babel output:

function _initializerWarningHelper(descriptor, context) {
  throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.');
}

how rude