0

I am using reactstrap in my React app which was originally created by create-react-app.

The problem I'm having is with reactstrap, I'm getting the following console warnings:

./~/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

In the project's GitHub issues, I see possible solutions listed like so: "To suppress the warning (for now), add this to your webpack config file...". The problem is, with Facebook's create-react-app I do not have a Webpack configuration file to configure. How can I go about fixing this warning

Andrew Li
  • 55,805
  • 14
  • 125
  • 143
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012

1 Answers1

2

Looks like this has raised concern for people with create-react-app and a feature request has been put in and is currently being worked on. It should be fixed in the near future so there you shouldn't really worry about it. But to answer the other part of the question, it's possible to get the Webpack, Babel and other configuration files from create-react-app by running npm run eject but since this is an irreversible action and will separate you from future updates, I would highly suggest just waiting for the fix to happen.

Andrew Li
  • 55,805
  • 14
  • 125
  • 143
  • Thanks Andrew, are there any other short term options? While they are working on a fix it is dependent on Bootstrap 4 being released which could be weeks or months away. – AnApprentice Jul 05 '17 at 01:56
  • 1
    @AnApprentice There's no short term fix the way I see it. The 'fix' would be to configure Webpack, but the only way you could do that would be by ejecting out of `create-react-app` which is something you really shouldn't do just for a warning. I would say just stick it out -- it's just a warning. – Andrew Li Jul 05 '17 at 01:58
  • Thanks Andrew. I'll leave the q open for a bit to see if anyone had any clever ideas we haven't thought of – AnApprentice Jul 05 '17 at 02:05
  • I tried ejecting the app once and everything broke so I had to revert. I'm trying to avoid having to eject – AnApprentice Jul 05 '17 at 02:05
  • 1
    @AnApprentice Yeah, it's really a bad choice to eject here if the warning is already being worked on and it's just a warning. – Andrew Li Jul 05 '17 at 02:06