小编suj*_*lin的帖子

Expo Web 无法编译“可选链接”

看起来 Expo Webpack 没有optional chaining

当我尝试将UI Kitten安装到 Expo Web 应用程序时,我发现了这一点。

这是我将 UI Kitten 添加到新创建的 Expo 应用程序后的编译错误

node_modules/@ui-kitten/components/ui/input/input.component.js 104:38
Module parse failed: Unexpected token (104:38)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.webEventResponder = devsupport_1.WebEventResponder.create(this);
|         this.focus = () => {
>             this.textInputRef.current?.focus();
|         };
|         this.blur = () => {
Run Code Online (Sandbox Code Playgroud)

Deps 版本(我在这里写的那一刻的最新版本。)

  • expo@37.0.6
  • @ui-kitten/components@5.0.0-alpha.1

有什么技巧可以解决这个问题?

javascript optional-chaining react-native-web expo react-native-ui-kitten

10
推荐指数
1
解决办法
2789
查看次数