Webpack babel 6 ES6 decorators

后端 未结 5 954
一个人的身影
一个人的身影 2020-11-28 04:47

I\'ve got a project written in ES6 with webpack as my bundler. Most of the transpiling works fine, but when I try to include decorators anywhere, I get this error:

5条回答
  •  难免孤独
    2020-11-28 05:25

    You just need a transform decorators plugin: http://babeljs.io/docs/plugins/transform-decorators/

提交回复
热议问题