React Boilerplate:未捕获RangeError:超出最大调用堆栈大小

Dha*_*oni 6 babel babeljs react-boilerplate babel-polyfill antd

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.
Run Code Online (Sandbox Code Playgroud)

仅当我使用npm run buildcommand 构建生产环境并使用http-server或提供这些文件时,才会发生这种情况serve

我已经将React-Boilerplate与antd Theme集成在一起,并且我必须在webpack中更改配置,尽管它在开发模式下可以按预期工作,但是在为生产构建时会抛出错误。

Dha*_*oni 2

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

由于我已删除该库并再次运行生产构建,因此它工作得很好。