使用裝飾器@報錯,已經運行了eject,安裝依賴安裝課程步驟來的
?安裝了兩個依賴包,也設置了.babelrc,使用@時,運行報錯Support for the experimental syntax 'decorators-legacy' isn't currently enabled,找了百度的解決方法,添加
?"plugins":?[ ??????[ ????????"@babel/plugin-proposal-decorators", ????????{ ??????????"legacy":?true ????????} ??????] ????],
不可解決。。請問怎么回事啊??
2019-10-17
這個插件不是添加在 .babelrc
需要添加在 package.json 中。