The create-react-app imports restriction outside of src directory

前端 未结 17 1815
时光说笑
时光说笑 2020-11-22 13:20

I am using create-react-app. I am trying to call an image from my public folder from a file inside my src/components. I am receiving this error message.

17条回答
  •  萌比男神i
    2020-11-22 13:50

    the best solution is to fork react-scripts, this is actually mentioned in the official documentation, see: Alternatives to Ejecting

提交回复
热议问题