我在我的React应用程序中使用了reactstrap,它最初是由create-react-app创建的。
我遇到的问题是reactstrap,我得到了以下控制台警告:
./~/reactstrap-tether/dist/js/tether.js
Critical dependencies:
2:479-486 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
@ ./~/reactstrap-tether/dist/js/tether.js 2:479-486在项目的GitHub问题中,我看到了可能的解决方案,如下所示:“要抑制警告(目前),请将以下内容添加到您的webpack配置文件中...”。问题是,使用Facebook的create-react-app,我没有要配置的Webpack配置文件。我如何着手修复此警告?
发布于 2017-07-05 09:55:31
看起来有create-react-app和a feature request的人的this has raised concern已经放入和is currently being worked on了。它应该在不久的将来被修复,所以你不应该真的担心它。但是要回答问题的另一部分,可以通过运行npm run eject从create-react-app获取Webpack、巴别塔和其他配置文件,但由于这是一个不可逆转的操作,并且会将您与未来的更新分开,我强烈建议您只需等待修复发生。
https://stackoverflow.com/questions/44915887
复制相似问题