티스토리 뷰

너무 간단해서 텍스트 쓸게 없지만.. 

import없이 환경변수 방법으로 가져와서 사용하면 된다!!

              <img
                alt="scenery 1"
                src={process.env.PUBLIC_URL + "/image/first.jpg"}
              />

 

공식문서 

https://create-react-app.dev/docs/using-the-public-folder/

 

Using the Public Folder | Create React App

Note: this feature is available with react-scripts@0.5.0 and higher.

create-react-app.dev