相关疑难解决方法(0)

“您可能需要一个额外的加载器来处理这些加载器的结果。”

我目前正在尝试为 ReactJs 构建一个状态管理库。但是一旦我将它实现到我的 React 项目(使用create-react-app)中,它就会开始删除这个错误:

Failed to compile.

path/to/agile/dist/runtime.js 116:104
Module parse failed: Unexpected token (116:104)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|       if (subscriptionContainer instanceof sub_1.CallbackContainer) subscriptionContainer.callback(); // If Component based subscription call the updateMethod which every framework has to define
|
>       if (subscriptionContainer instanceof sub_1.ComponentContainer) if (this.agileInstance.integration?.updateMethod) this.agileInstance.integration?.updateMethod(subscriptionContainer.component, Runtime.formatChangedPropKeys(subscriptionContainer));
|     }); // Log Job
|
Run Code Online (Sandbox Code Playgroud)

如果我注释掉错误中提到的突出显示的代码行,它会跳转到另一个点并在那里抱怨。但这不可能是语法错误,因为 TypeScript 也会在 IDE 中抱怨。 …

javascript typescript reactjs webpack

15
推荐指数
4
解决办法
3万
查看次数

标签 统计

javascript ×1

reactjs ×1

typescript ×1

webpack ×1