1

I have set up karma with the karma-babel-preprocessor, and es2015 in the presets.

I'm using decorators in my code but I don't know how to configure karma to accept them. I have been trying for a while unsuccesfully.

Adding plugins: ['transform-decorators'] to the babelPreprocessor options doesn't help.

Any help will be appreciated.

Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143

1 Answers1

1

This was caused by a currently open issue regarding decorators (which I'm using) and babel.

See these issues in Babel:

#2645 - Fix Decorators

#2801 - Failed to transform decorators with babel-plugin-transform-decorators@6.0.14

#2727 - Decorators are broken in 6.x

  • See http://stackoverflow.com/questions/33801311/webpack-babel-6-es6-decorators for solution. – arve0 Dec 30 '15 at 20:32