Closed liwei00wade closed 5 years ago
This is a problem with Create-React-App. Only imports from the src
folder go through the Babel process. So when you require things outside of it, it will give you an error (i.e. just in case you require a JS file outside of the src
folder, it will not get transformed).
You can actually disable this if you eject
the project and change the webpack setting. More info here: https://stackoverflow.com/questions/44114436/the-create-react-app-imports-restriction-outside-of-src-directory
Will close this issue for now, thanks!
Module not found: You attempted to import ../../public/images/fail.gif which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.