๐Ÿ‘‰ react ์ ˆ๋Œ€ ๊ฒฝ๋กœ ์„ค์ •

ํŒŒ์ผ์„ import ํ•  ๊ฒฝ์šฐ ๊ฒฝ๋กœ๊ฐ€ ์ฆ๊ฐ€ํ•˜๋ฉด '../../file.js' ์ด๋Ÿฐ์‹์œผ๋กœ ์•Œ์•„๋ณด๊ธฐ ์–ด๋ ต๊ธฐ ๋•Œ๋ฌธ์— srcํด๋” ์•ˆ์— ํŒŒ์ผ์ด ์กด์žฌํ•˜๋ฉด '/file.js' ๋กœ importํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค์ • ๋ณ€๊ฒฝ

//yarn ์„ค์น˜ ๋ฐฉ๋ฒ•
yarn add cross-env        // ์„ค์น˜ ํ›„
pakage.json
// scripts ๋ถ€๋ถ„
"start": "cross-env NODE_PATH=src/ react-scripts start"
// build ๋ถ€๋ถ„
"build": "cross-env NODE_PATH=src/ react-scripts build"


//ํŒŒ์ผ ์ตœ์ƒ๋‹จ์— .envํŒŒ์ผ ์ƒ์„ฑ
//.env ํŒŒ์ผ ๋‚ด์— 
NODE_PATH=src/
//์ €์žฅ