我正在嘗試在 redux 應用程序中實現網絡工作者所以我采用了以下示例并在 tyhe 沙箱中實現 https://github.com/ardi-n/react-redux-web-workers-sample-app為此,他們使用 babel所以我使用了一個工作 babel 代碼沙箱,它具有以下配置。{ "presets": [ "@babel/preset-env" ], "plugins": [ [ "@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": false } ] ]}但該應用程序具有此配置{ "presets": [ "env", "react", "es2015" ], "plugins": [ "transform-es2015-destructuring", "transform-object-rest-spread" ]}當我更換配置時,出現以下錯誤。所以我研究并得到了這個鏈接 https://babeljs.io/docs/en/config-files/我也安裝了這兩個依賴項 @babel/plugin-transform-destructuring 和 babel-plugin-transform-es2015-destructuring但我仍然面臨這些問題。你能告訴我怎么修嗎?在下面提供我的代碼沙箱。https://codesandbox.io/s/kt3kparcel-babel7-decorators-example-l9wxk
用于反應應用程序的代碼沙箱的 babel 配置
一只斗牛犬
2021-09-17 10:15:33