【问题标题】:React Boilerplate : Uncaught RangeError: Maximum call stack size exceededReact Boilerplate:未捕获的 RangeError:超出最大调用堆栈大小
【发布时间】:2019-07-22 18:07:12
【问题描述】:

由于以下原因,我收到Uncaught RangeError: Maximum call stack size exceeded 的错误:

npm.babel.e5824bbfde6f57781e4f.chunk.js:1 @babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning.

只有当我使用npm run build 命令构建生产并使用http-serverserve 提供这些文件时才会发生这种情况。

我已将 React-Boilerplate 与 antd Theme 集成,我不得不更改 webpack 中的配置,尽管它在开发模式下按预期工作,但在构建生产时抛出错误。

【问题讨论】:

  • 有任何公共 git repo 来检查这个问题吗?

标签: babeljs antd react-boilerplate babel-polyfill


【解决方案1】:

实际上,我使用的是第三方库 https://github.com/onfido/onfido-sdk-ui,这导致了该问题。

由于我已删除该库并再次运行生产版本,它工作得非常好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-01-24
    • 2014-08-01
    • 2015-10-28
    • 2013-05-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多