Webpack babel 6 ES6 decorators

后端 未结 5 957
一个人的身影
一个人的身影 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:38

    After spending 5 minutes on the babeljs slack webchat, I found out that decorators are broken in the current version of babel (v6.2). The only solution seems to be to downgrade to 5.8 at this time.

    It would also seem they moved their issue tracker from github to https://phabricator.babeljs.io

    I write all this down, since after hours of searching I have found the current documentation very poor and lacking.

提交回复
热议问题